def client(loop, aiohttp_client):
    """Fixture to set up a web.Application."""
    app = web.Application()
    setup_cors(app, [TRUSTED_ORIGIN])
    app["allow_configured_cors"](app.router.add_get("/", mock_handler))
    return loop.run_until_complete(aiohttp_client(app))
Beispiel #2
0
def client(loop, test_client):
    """Fixture to setup a web.Application."""
    app = web.Application()
    app.router.add_get('/', mock_handler)
    setup_cors(app, [TRUSTED_ORIGIN])
    return loop.run_until_complete(test_client(app))
Beispiel #3
0
def client(loop, aiohttp_client):
    """Fixture to setup a web.Application."""
    app = web.Application()
    app.router.add_get('/', mock_handler)
    setup_cors(app, [TRUSTED_ORIGIN])
    return loop.run_until_complete(aiohttp_client(app))