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

Function test_file_response_range_416

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

Source from the content-addressed store, hash-verified

793
794
795def test_file_response_range_416(file_response_client: TestClient) -> None:
796 response = file_response_client.head("/", headers={"Range": f"bytes={len(README.encode('utf8')) + 1}-"})
797 assert response.status_code == 416
798 assert response.headers["Content-Range"] == f"bytes */{len(README.encode('utf8'))}"
799
800
801def test_file_response_only_support_bytes_range(file_response_client: TestClient) -> None:

Callers

nothing calls this directly

Calls 1

headMethod · 0.80

Tested by

no test coverage detected