MCPcopy Create free account
hub / github.com/encode/starlette / test_streaming_response_unknown_size

Function test_streaming_response_unknown_size

tests/test_responses.py:574–580  ·  view source on GitHub ↗
(
    test_client_factory: TestClientFactory,
)

Source from the content-addressed store, hash-verified

572
573
574def test_streaming_response_unknown_size(
575 test_client_factory: TestClientFactory,
576) -> None:
577 app = StreamingResponse(content=iter(["hello", "world"]))
578 client: TestClient = test_client_factory(app)
579 response = client.get("/")
580 assert "content-length" not in response.headers
581
582
583def test_streaming_response_known_size(test_client_factory: TestClientFactory) -> None:

Callers

nothing calls this directly

Calls 3

StreamingResponseClass · 0.90
test_client_factoryFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected