Skip to content
Myr

test_subclassing.py

This file

Path

tests/test_subclassing.py

21 lines · 480 bytes · Python

Last changed by

pass context through dispatch methods (#5818)David Lordbefore adoption70d04b5

History of this file

Take it

The walk stopped after 200 commits: lines older than 73739a2 point at it.

Merge branch '2.2.x'David Lordbefore adoption73739a2

lines 1–7why, one step back
1from io import StringIO
23import flask456def test_suppressed_exception_logging():7 class SuppressedFlask(flask.Flask):

pass context through dispatch methods (#5818)David Lordbefore adoption70d04b5

line 8why, one step back
8 def log_exception(self, ctx, exc_info):

Merge branch '2.2.x'David Lordbefore adoption73739a2

lines 9–21why, one step back
9 pass
1011 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()