()
| 618 | |
| 619 | |
| 620 | def test_range_request_out_of_bound(): |
| 621 | env = create_environ() |
| 622 | response = wrappers.Response("Hello World") |
| 623 | env["HTTP_RANGE"] = "bytes=6-666" |
| 624 | response.make_conditional(env, accept_ranges=True, complete_length=11) |
| 625 | assert response.status_code == 206 |
| 626 | assert response.headers["Accept-Ranges"] == "bytes" |
| 627 | assert response.headers["Content-Range"] == "bytes 6-10/11" |
| 628 | assert response.headers["Content-Length"] == "5" |
| 629 | assert response.data == b"World" |
| 630 | |
| 631 | |
| 632 | def test_range_request_with_file(): |
nothing calls this directly
no test coverage detected