Skip to main content

py.test integration for aioresponses

Project description

PyPI version Python versions

An integration of aioresponses for py.test similar to pytest-responses


Installation

You can install “pytest-aioresponses” via pip from PyPI:

$ pip install pytest-aioresponses

Usage

import aiohttp
import pytest

@pytest.mark.asyncio
async def test_something(aioresponses):
    aioresponses.get("https://hello.aio")

    async with aiohttp.ClientSession() as session:
        async with session.get("https://hello.aio") as response:
            assert response.status == 200

Contributing

Contributions are very welcome.

License

Distributed under the terms of the MIT license, “pytest-aioresponses” is free and open source software

Issues

If you encounter any problems, please file an issue along with a detailed description.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest-aioresponses-0.2.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

pytest_aioresponses-0.2.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file pytest-aioresponses-0.2.0.tar.gz.

File metadata

  • Download URL: pytest-aioresponses-0.2.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.8.6 Linux/5.4.0-77-generic

File hashes

Hashes for pytest-aioresponses-0.2.0.tar.gz
Algorithm Hash digest
SHA256 61cced206857cb4e7aab10b61600527f505c358d046e7d3ad3ae09455d02d937
MD5 5a56699d1f474383c36fd32903847f04
BLAKE2b-256 cadeef95de79da7a5aaf195281bd30251b06aece69f6b570730677c25455a243

See more details on using hashes here.

File details

Details for the file pytest_aioresponses-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_aioresponses-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1a78d1eb76e1bffe7adc83a1bad0d48c373b41289367ae1f5e7ec0fceb60a04d
MD5 51b6cc6dd5adae9bfd8d7d561a2485a3
BLAKE2b-256 86c8aeeafca2bec8ede3c08eac57287a7fecec2f0d62892a1d4cb11a2d38a5bc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page