(app, client)
| 764 | |
| 765 | |
| 766 | def 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 | |
| 784 | def test_teardown_request_handler_error(app, client): |