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

Function test_lint_middleware_invalid_location

tests/middleware/test_lint.py:77–86  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

75
76
77def test_lint_middleware_invalid_location():
78 def my_dummy_application(environ, start_response):
79 start_response("200 OK", [("location", "foo")])
80 return [b"Foo"]
81
82 app = LintMiddleware(my_dummy_application)
83
84 environ = create_environ("/test")
85 with pytest.warns(HTTPWarning, match="Absolute URLs required for location header."):
86 run_wsgi_app(app, environ, buffered=True)

Callers

nothing calls this directly

Calls 3

LintMiddlewareClass · 0.90
create_environFunction · 0.90
run_wsgi_appFunction · 0.90

Tested by

no test coverage detected