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

Function test_non_empty_response

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

Source from the content-addressed store, hash-verified

545
546
547def test_non_empty_response(test_client_factory: TestClientFactory) -> None:
548 app = Response(content="hi")
549 client: TestClient = test_client_factory(app)
550 response = client.get("/")
551 assert response.headers["content-length"] == "2"
552
553
554def test_response_do_not_add_redundant_charset(

Callers

nothing calls this directly

Calls 3

ResponseClass · 0.90
test_client_factoryFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected