(transport)
| 369 | |
| 370 | |
| 371 | def test_write_payload_chunked(transport): |
| 372 | write = transport.write = mock.Mock() |
| 373 | |
| 374 | msg = protocol.Response(transport, 200) |
| 375 | msg.enable_chunked_encoding() |
| 376 | msg.send_headers() |
| 377 | |
| 378 | msg.write(b&class="cm">#x27;data') |
| 379 | msg.write_eof() |
| 380 | |
| 381 | content = b&class="cm">#x27;'.join([c[1][0] for c in list(write.mock_calls)]) |
| 382 | assert b&class="cm">#x27;4\r\ndata\r\n0\r\n\r\nclass="st">' == content.split(b'\r\n\r\n', 1)[-1] |
| 383 | |
| 384 | |
| 385 | def test_write_payload_chunked_multiple(transport): |
nothing calls this directly
no test coverage detected