MCPcopy
hub / github.com/aio-libs/aiohttp / test_auto_header_user_agent

Function test_auto_header_user_agent

tests/test_client_functional.py:119–132  ·  view source on GitHub ↗
(create_app_and_client)

Source from the content-addressed store, hash-verified

117
118@pytest.mark.run_loop
119def test_auto_header_user_agent(create_app_and_client):
120 @asyncio.coroutine
121 def handler(request):
122 assert 'aiohttp' in request.headers['user-agent']
123 return web.Response()
124
125 app, client = yield from create_app_and_client()
126 app.router.add_route('GET', '/', handler)
127
128 resp = yield from client.get('/')
129 try:
130 assert 200, resp.status
131 finally:
132 yield from resp.release()
133
134
135@pytest.mark.run_loop

Callers

nothing calls this directly

Calls 4

create_app_and_clientFunction · 0.85
add_routeMethod · 0.45
getMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected