MCPcopy
hub / github.com/pallets/werkzeug / test_range_request_out_of_bound

Function test_range_request_out_of_bound

tests/test_wrappers.py:620–629  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

618
619
620def 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
632def test_range_request_with_file():

Callers

nothing calls this directly

Calls 2

make_conditionalMethod · 0.95
create_environFunction · 0.90

Tested by

no test coverage detected