MCPcopy
hub / github.com/aio-libs/aiohttp / test_prepare_chunked_force

Function test_prepare_chunked_force

tests/test_protocol.py:314–323  ·  view source on GitHub ↗
(transport)

Source from the content-addressed store, hash-verified

312
313
314def test_prepare_chunked_force(transport):
315 msg = protocol.Response(transport, 200)
316 msg.enable_chunked_encoding()
317
318 chunked = msg._write_chunked_payload = mock.Mock()
319 chunked.return_value = iter([1, 2, 3])
320
321 msg.add_headers(('content-length', '42'))
322 msg.send_headers()
323 assert chunked.called
324
325
326def test_prepare_chunked_no_length(transport):

Callers

nothing calls this directly

Calls 3

add_headersMethod · 0.80
send_headersMethod · 0.80

Tested by

no test coverage detected