(create_app_and_client)
| 43 | |
| 44 | @pytest.mark.run_loop |
| 45 | def 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 |
nothing calls this directly
no test coverage detected