Skip to main content

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


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.3.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

pytest_aiohttp-0.3.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file pytest-aiohttp-0.3.0.tar.gz.

File metadata

File hashes

Hashes for pytest-aiohttp-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c929854339637977375838703b62fef63528598bc0a9d451639eba95f4aaa44f
MD5 f9020a2d82bfc868330a4ab66949406f
BLAKE2b-256 88f3e2154eb35748ed4af9b803776450684454914635919ea91219e737c01058

See more details on using hashes here.

File details

Details for the file pytest_aiohttp-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_aiohttp-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0b9b660b146a65e1313e2083d0d2e1f63047797354af9a28d6b7c9f0726fa33d
MD5 be84070568e24e88f80a6a65584039e5
BLAKE2b-256 c92f34f8581a799d1e58f0b64d9eb4aa0864b53f520d160281c2eb692340fefc

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