skip to navigation
skip to content

pytest-aiohttp 0.1.3

pytest plugin for aiohttp support


pytest plugin for aiohttp support

The library allows to use aiohttp pytest pugin 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


0.1.3 (2016-09-08)

  • Add file

0.1.2 (2016-08-07)

  • Fix README markup

0.1.1 (2016-07-22)

  • Fix an url in

0.1.0 (2016-07-22)

  • Initial release
File Type Py Version Uploaded on Size
pytest-aiohttp-0.1.3.tar.gz (md5) Source 2016-09-08 6KB
pytest_aiohttp-0.1.3-py3-none-any.whl (md5) Python Wheel py3 2016-09-08 3KB