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

Function test_location_header_autocorrect

tests/test_wrappers.py:1174–1179  ·  view source on GitHub ↗
(monkeypatch, auto, location, expect)

Source from the content-addressed store, hash-verified

1172 ),
1173)
1174def test_location_header_autocorrect(monkeypatch, auto, location, expect):
1175 monkeypatch.setattr(wrappers.Response, "autocorrect_location_header", auto)
1176 env = create_environ("/a/b/c")
1177 resp = wrappers.Response("Hello World!")
1178 resp.headers["Location"] = location
1179 assert resp.get_wsgi_headers(env)["Location"] == expect
1180
1181
1182def test_204_and_1XX_response_has_no_content_length():

Callers

nothing calls this directly

Calls 2

get_wsgi_headersMethod · 0.95
create_environFunction · 0.90

Tested by

no test coverage detected