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

Function test_empty_response

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

Source from the content-addressed store, hash-verified

529
530
531def test_empty_response(test_client_factory: TestClientFactory) -> None:
532 app = Response()
533 client: TestClient = test_client_factory(app)
534 response = client.get("/")
535 assert response.content == b""
536 assert response.headers["content-length"] == "0"
537 assert "content-type" not in response.headers
538
539
540def test_empty_204_response(test_client_factory: TestClientFactory) -> None:

Callers

nothing calls this directly

Calls 3

ResponseClass · 0.90
test_client_factoryFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected