MCPcopy
hub / github.com/encode/uvicorn / test_invalid_http

Function test_invalid_http

tests/protocols/test_http.py:529–534  ·  view source on GitHub ↗
(http_protocol_cls: type[HTTPProtocol])

Source from the content-addressed store, hash-verified

527
528
529async def test_invalid_http(http_protocol_cls: type[HTTPProtocol]):
530 app = Response("Hello, world", media_type="text/plain")
531
532 protocol = get_connected_protocol(app, http_protocol_cls)
533 protocol.data_received(b"x" * 100000)
534 assert protocol.transport.is_closing()
535
536
537async def test_app_exception(http_protocol_cls: type[HTTPProtocol]):

Callers

nothing calls this directly

Calls 4

ResponseClass · 0.90
get_connected_protocolFunction · 0.70
data_receivedMethod · 0.45
is_closingMethod · 0.45

Tested by

no test coverage detected