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

Function test_lint_middleware_http_headers

tests/middleware/test_lint.py:65–74  ·  view source on GitHub ↗
(headers, message)

Source from the content-addressed store, hash-verified

63 ],
64)
65def test_lint_middleware_http_headers(headers, message):
66 def my_dummy_application(environ, start_response):
67 start_response("200 OK", headers)
68 return [b"Foo"]
69
70 app = LintMiddleware(my_dummy_application)
71
72 environ = create_environ("/test")
73 with pytest.warns(WSGIWarning, match=message):
74 run_wsgi_app(app, environ, buffered=True)
75
76
77def test_lint_middleware_invalid_location():

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