()
| 40 | |
| 41 | |
| 42 | def 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( |
nothing calls this directly
no test coverage detected