Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (
Help us improve Python packaging - Donate today!

webtest-aiohttp provides integration of WebTest with aiohttp.web applications

Project Description

webtest-aiohttp provides integration of WebTest with aiohttp.web applications

import asyncio

from aiohttp import web
from webtest_aiohttp import TestApp

loop = asyncio.get_event_loop()

app = web.Application(loop=loop)

def hello(request):
    return web.Response(body=json.dumps(
        {'message': 'Hello world'}
    ).encode('utf-8'), content_type='application/json')

app.router.add_route('GET', '/', handler)

def test_hello():
    client = TestApp(app)
    res = client.get('/')
    assert res.status_code == 200
    assert res.json == {'message': 'Hello world'}


pip install webtest-aiohttp


This code was adapted from Kirill Klenov’s muffin library.


MIT licensed. See the bundled LICENSE file for more details.

Release History

This version
History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Hash SHA256 Hash Help Version File Type Upload Date
(6.1 kB) Copy SHA256 Hash SHA256
py2.py3 Wheel Oct 20, 2015
(4.0 kB) Copy SHA256 Hash SHA256
Source Oct 20, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting