py.test integration for aioresponses
Project Links
Meta
Author: Konstantin Manna
Requires Python: >=3.6,<4.0
Classifiers
Development Status
- 4 - Beta
Framework
- Pytest
Intended Audience
- Developers
License
- OSI Approved :: MIT License
Operating System
- OS Independent
Programming Language
- Python
- Python :: 3
- Python :: 3.6
- Python :: 3.7
- Python :: 3.8
- Python :: 3.9
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
- Python :: 3.13
- Python :: 3 :: Only
- Python :: 3.5
- Python :: Implementation :: CPython
- Python :: Implementation :: PyPy
Topic
- Software Development :: Testing
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.