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

Function test_teardown_request_handler_debug_mode

tests/test_basic.py:766–781  ·  view source on GitHub ↗
(app, client)

Source from the content-addressed store, hash-verified

764
765
766def test_teardown_request_handler_debug_mode(app, client):
767 called = []
768
769 @app.teardown_request
770 def teardown_request(exc):
771 called.append(True)
772 return "Ignored"
773
774 @app.route("/")
775 def root():
776 return "Response"
777
778 rv = client.get("/")
779 assert rv.status_code == 200
780 assert b"Response" in rv.data
781 assert len(called) == 1
782
783
784def test_teardown_request_handler_error(app, client):

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected