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.
Release files for pytest-aioresponses 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pytest_aioresponses-0.3.0.tar.gz | 2.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytest_aioresponses-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.0 kB
Release files / pytest_aioresponses-0.3.0.tar.gz
| Download URL | pytest_aioresponses-0.3.0.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5677b32dfa1a36908b347524b5867aab35ac1c5ce1d4970244d6f66009bca7b6
|
|
BLAKE2b-256 checksum How to use checksums |
15f088ea99ad637726e12640199464268754f336c54b87e99f898d7c9926b71b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.10.6 Linux/5.15.0-130-generic
|
Release files / pytest_aioresponses-0.3.0-py3-none-any.whl
| Download URL | pytest_aioresponses-0.3.0-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
60f3124ff05a0210a5f369dd95e4cf66090774ba76b322f7178858ce4e6c1647
|
|
BLAKE2b-256 checksum How to use checksums |
8278d7e10efd0e1c3ca9195d6de264536989a3a1f43baefed7d4a8ac79e2c938
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.10.6 Linux/5.15.0-130-generic
|