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

Function test_keepalive_response_released

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

Source from the content-addressed store, hash-verified

43
44@pytest.mark.run_loop
45def test_keepalive_response_released(create_app_and_client):
46 @asyncio.coroutine
47 def handler(request):
48 body = yield from request.read()
49 assert b'' == body
50 return web.Response(body=b'OK')
51
52 app, client = yield from create_app_and_client()
53 app.router.add_route('GET', '/', handler)
54
55 resp1 = yield from client.get('/')
56 yield from resp1.release()
57 resp2 = yield from client.get('/')
58 yield from resp2.release()
59
60 assert 1 == len(client._session.connector._conns)
61
62
63@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