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

Function test_file_response_head

tests/test_responses.py:730–736  ·  view source on GitHub ↗
(file_response_client: TestClient)

Source from the content-addressed store, hash-verified

728
729
730def test_file_response_head(file_response_client: TestClient) -> None:
731 response = file_response_client.head("/")
732 assert response.status_code == 200
733 assert "content-range" not in response.headers
734 assert response.headers["content-length"] == str(len(README.encode("utf8")))
735 assert response.headers["content-type"] == "text/plain; charset=utf-8"
736 assert response.content == b""
737
738
739def test_file_response_range(file_response_client: TestClient) -> None:

Callers

nothing calls this directly

Calls 1

headMethod · 0.80

Tested by

no test coverage detected