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

Function test_write_payload_chunked_large_chunk

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

Source from the content-addressed store, hash-verified

443
444
445def test_write_payload_chunked_large_chunk(transport):
446 write = transport.write = mock.Mock()
447 msg = protocol.Response(transport, 200)
448 msg.send_headers()
449
450 msg.add_chunking_filter(1024)
451 msg.write(b'data')
452 msg.write_eof()
453 content = b''.join([c[1][0] for c in list(write.mock_calls)])
454 assert content.endswith(b'4\r\ndata\r\n0\r\n\r\n')
455
456
457def test_write_payload_deflate_filter(transport):

Callers

nothing calls this directly

Calls 4

write_eofMethod · 0.95
send_headersMethod · 0.80
add_chunking_filterMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected