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

Function test_send_headers_nomore_add

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

Source from the content-addressed store, hash-verified

289
290
291def test_send_headers_nomore_add(transport):
292 msg = protocol.Response(transport, 200)
293 msg.add_headers(('content-type', 'plain/html'))
294 msg.send_headers()
295
296 with pytest.raises(AssertionError):
297 msg.add_header('content-type', 'plain/html')
298 # cleanup
299 msg.writer.close()
300
301
302def test_prepare_length(transport):

Callers

nothing calls this directly

Calls 4

add_headersMethod · 0.80
send_headersMethod · 0.80
add_headerMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected