MCPcopy Create free account
hub / github.com/pallets/flask / test_log_view_exception

Function test_log_view_exception

tests/test_logging.py:86–98  ·  view source on GitHub ↗
(app, client)

Source from the content-addressed store, hash-verified

84
85
86def 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

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected