MCPcopy
hub / github.com/encode/starlette / test_streaming_response_memoryview

Function test_streaming_response_memoryview

tests/test_responses.py:597–601  ·  view source on GitHub ↗
(test_client_factory: TestClientFactory)

Source from the content-addressed store, hash-verified

595
596
597def test_streaming_response_memoryview(test_client_factory: TestClientFactory) -> None:
598 app = StreamingResponse(content=iter([memoryview(b"\xc0"), memoryview(b"\xf5")]))
599 client: TestClient = test_client_factory(app)
600 response = client.get("/")
601 assert response.content == b"\xc0\xf5"
602
603
604@pytest.mark.anyio

Callers

nothing calls this directly

Calls 3

StreamingResponseClass · 0.90
test_client_factoryFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected