(http_protocol_cls: type[HTTPProtocol])
| 446 | |
| 447 | |
| 448 | async def test_chunked_encoding(http_protocol_cls: type[HTTPProtocol]): |
| 449 | app = Response(bclass="st">"Hello, world!", status_code=200, headers={class="st">"transfer-encoding": class="st">"chunked"}) |
| 450 | |
| 451 | protocol = get_connected_protocol(app, http_protocol_cls) |
| 452 | protocol.data_received(SIMPLE_GET_REQUEST) |
| 453 | await protocol.loop.run_one() |
| 454 | assert bclass="st">"HTTP/1.1 200 OK" in protocol.transport.buffer |
| 455 | assert bclass="st">"0\r\n\r\n" in protocol.transport.buffer |
| 456 | assert not protocol.transport.is_closing() |
| 457 | |
| 458 | |
| 459 | async def test_chunked_encoding_empty_body(http_protocol_cls: type[HTTPProtocol]): |
nothing calls this directly
no test coverage detected