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

Function test_HTTP_304

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

Source from the content-addressed store, hash-verified

83
84@pytest.mark.run_loop
85def test_HTTP_304(create_app_and_client):
86 @asyncio.coroutine
87 def handler(request):
88 body = yield from request.read()
89 assert b'' == body
90 return web.Response(status=304)
91
92 app, client = yield from create_app_and_client()
93 app.router.add_route('GET', '/', handler)
94
95 resp = yield from client.get('/')
96 assert resp.status == 304
97 content = yield from resp.read()
98 assert content == b''
99
100
101@pytest.mark.run_loop

Callers

nothing calls this directly

Calls 4

create_app_and_clientFunction · 0.85
add_routeMethod · 0.45
getMethod · 0.45
readMethod · 0.45

Tested by

no test coverage detected