(app, client)
| 52 | |
| 53 | |
| 54 | def test_wsgi_errors_stream(app, client): |
| 55 | @app.route("/") |
| 56 | def index(): |
| 57 | app.logger.error("test") |
| 58 | return "" |
| 59 | |
| 60 | stream = StringIO() |
| 61 | client.get("/", errors_stream=stream) |
| 62 | assert "ERROR in test_logging: test" in stream.getvalue() |
| 63 | |
| 64 | assert wsgi_errors_stream._get_current_object() is sys.stderr |
| 65 | |
| 66 | with app.test_request_context(errors_stream=stream): |
| 67 | assert wsgi_errors_stream._get_current_object() is stream |
| 68 | |
| 69 | |
| 70 | def test_has_level_handler(): |
nothing calls this directly
no test coverage detected