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

Function test_file_response_range_head

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

Source from the content-addressed store, hash-verified

746
747
748def test_file_response_range_head(file_response_client: TestClient) -> None:
749 response = file_response_client.head("/", headers={"Range": "bytes=0-100"})
750 assert response.status_code == 206
751 assert response.headers["content-range"] == f"bytes 0-100/{len(README.encode('utf8'))}"
752 assert response.headers["content-length"] == str(101)
753 assert response.headers["content-type"] == "text/plain; charset=utf-8"
754 assert response.content == b""
755
756
757def test_file_response_range_multi(file_response_client: TestClient) -> None:

Callers

nothing calls this directly

Calls 1

headMethod · 0.80

Tested by

no test coverage detected