(http_protocol_cls: type[HTTPProtocol])
| 399 | |
| 400 | |
| 401 | async def test_keepalive_timeout(http_protocol_cls: type[HTTPProtocol]): |
| 402 | app = Response(b"", status_code=204) |
| 403 | |
| 404 | protocol = get_connected_protocol(app, http_protocol_cls) |
| 405 | protocol.data_received(SIMPLE_GET_REQUEST) |
| 406 | await protocol.loop.run_one() |
| 407 | assert b"HTTP/1.1 204 No Content" in protocol.transport.buffer |
| 408 | assert not protocol.transport.is_closing() |
| 409 | protocol.loop.run_later(with_delay=1) |
| 410 | assert not protocol.transport.is_closing() |
| 411 | protocol.loop.run_later(with_delay=5) |
| 412 | assert protocol.transport.is_closing() |
| 413 | |
| 414 | |
| 415 | async def test_keepalive_timeout_with_pipelined_requests(http_protocol_cls: type[HTTPProtocol]): |
nothing calls this directly
no test coverage detected