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

Function test_lint_middleware_invalid_status

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

Source from the content-addressed store, hash-verified

40
41
42def test_lint_middleware_invalid_status():
43 def my_dummy_application(environ, start_response):
44 start_response("20 OK", [("Content-Type", "text/plain")])
45 return [b"Foo"]
46
47 app = LintMiddleware(my_dummy_application)
48
49 environ = create_environ("/test")
50 with pytest.warns(WSGIWarning) as record:
51 run_wsgi_app(app, environ, buffered=True)
52
53 # Returning status 20 should raise three different warnings
54 assert len(record) == 3
55
56
57@pytest.mark.parametrize(

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