| 746 | |
| 747 | |
| 748 | def 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 | |
| 757 | def test_file_response_range_multi(file_response_client: TestClient) -> None: |