(transport)
| 300 | |
| 301 | |
| 302 | def test_prepare_length(transport): |
| 303 | msg = protocol.Response(transport, 200) |
| 304 | w_l_p = msg._write_length_payload = mock.Mock() |
| 305 | w_l_p.return_value = iter([1, 2, 3]) |
| 306 | |
| 307 | msg.add_headers(('content-length', '42')) |
| 308 | msg.send_headers() |
| 309 | |
| 310 | assert w_l_p.called |
| 311 | assert (42,) == w_l_p.call_args[0] |
| 312 | |
| 313 | |
| 314 | def test_prepare_chunked_force(transport): |
nothing calls this directly
no test coverage detected