pytest plugin for aiohttp support
Project description
pytest-aiohttp
pytest plugin for aiohttp support
The library allows to use aiohttp pytest plugin without need for implicitly loading it like pytest_plugins = ‘aiohttp.pytest_plugin’.
Just run:
$ pip install pytest-aiohttp
and write tests with the plugin support:
from aiohttp import web
async def hello(request):
return web.Response(body=b'Hello, world')
def create_app(loop):
app = web.Application(loop=loop)
app.router.add_route('GET', '/', hello)
return app
async def test_hello(test_client):
client = await test_client(create_app)
resp = await client.get('/')
assert resp.status == 200
text = await resp.text()
assert 'Hello, world' in text
CHANGES
0.2.0 (2017-11-30)
Fix backward incompatibility changes introduced by pytest 3.3+
0.1.3 (2016-09-08)
Add MANIFEST.in file
0.1.2 (2016-08-07)
Fix README markup
0.1.1 (2016-07-22)
Fix an url in setup.py
0.1.0 (2016-07-22)
Initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pytest-aiohttp-0.2.0.tar.gz
(6.9 kB
view details)
Built Distribution
File details
Details for the file pytest-aiohttp-0.2.0.tar.gz
.
File metadata
- Download URL: pytest-aiohttp-0.2.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7497601a9cfd567d2e7f7daaee1ceca32720710e8c0e1361a5b5b76f750ac3bd |
|
MD5 | fa1536b146344f3437d5ac70dcde8b24 |
|
BLAKE2b-256 | 02a0858195263c40d3435dc2ec2d6cb8fd2365a910a1e8bb32bc9bd753389904 |
File details
Details for the file pytest_aiohttp-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: pytest_aiohttp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ecbd8eb108c61351318ac69d5dd9d0d6185cb00694422eead2ced0dd4e9821f2 |
|
MD5 | 64cbfa5e7130c2ca533250c1b36be4b7 |
|
BLAKE2b-256 | 905fe6d830b7bbde6e7b3241adc460e5e612b8b9346de462b7131c31f44c53f0 |