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

Function test_response_phrase

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

Source from the content-addressed store, hash-verified

199
200
201def test_response_phrase(test_client_factory: TestClientFactory) -> None:
202 app = Response(status_code=204)
203 client = test_client_factory(app)
204 response = client.get("/")
205 assert response.reason_phrase == "No Content"
206
207 app = Response(b"", status_code=123)
208 client = test_client_factory(app)
209 response = client.get("/")
210 assert response.reason_phrase == ""
211
212
213def test_file_response(tmp_path: Path, 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