test_subclassing.py
This file
Path
tests/test_subclassing.py
21 lines · 475 bytes · Python
Last changed by
Not known.
History of this fileTake it
The walk stopped after 200 commits: lines older than 4240ace point at it.
Merge remote-tracking branch 'origin/2.0.x'David Lordbefore adoption4240ace
lines 1–21why, one step back1from io import StringIO23import flask456def test_suppressed_exception_logging():7 class SuppressedFlask(flask.Flask):8 def log_exception(self, exc_info):9 pass1011 out = StringIO()12 app = SuppressedFlask(__name__)1314 @app.route("/")15 def index():16 raise Exception("test")1718 rv = app.test_client().get("/", errors_stream=out)19 assert rv.status_code == 50020 assert b"Internal Server Error" in rv.data21 assert not out.getvalue()