(transport)
| 399 | |
| 400 | |
| 401 | def test_write_payload_length(transport): |
| 402 | write = transport.write = mock.Mock() |
| 403 | |
| 404 | msg = protocol.Response(transport, 200) |
| 405 | msg.add_headers(('content-length', '2')) |
| 406 | msg.send_headers() |
| 407 | |
| 408 | msg.write(b'd') |
| 409 | msg.write(b'ata') |
| 410 | msg.write_eof() |
| 411 | |
| 412 | content = b''.join([c[1][0] for c in list(write.mock_calls)]) |
| 413 | assert b'da' == content.split(b'\r\n\r\n', 1)[-1] |
| 414 | |
| 415 | |
| 416 | def test_write_payload_chunked_filter(transport): |
nothing calls this directly
no test coverage detected