(app, client)
| 84 | |
| 85 | |
| 86 | def test_log_view_exception(app, client): |
| 87 | @app.route("/") |
| 88 | def index(): |
| 89 | raise Exception("test") |
| 90 | |
| 91 | app.testing = False |
| 92 | stream = StringIO() |
| 93 | rv = client.get("/", errors_stream=stream) |
| 94 | assert rv.status_code == 500 |
| 95 | assert rv.data |
| 96 | err = stream.getvalue() |
| 97 | assert "Exception on / [GET]" in err |
| 98 | assert "Exception: test" in err |