(app, client)
| 731 | |
| 732 | |
| 733 | def test_after_request_processing(app, client): |
| 734 | @app.route("/") |
| 735 | def index(): |
| 736 | @flask.after_this_request |
| 737 | def foo(response): |
| 738 | response.headers["X-Foo"] = "a header" |
| 739 | return response |
| 740 | |
| 741 | return "Test" |
| 742 | |
| 743 | resp = client.get("/") |
| 744 | assert resp.status_code == 200 |
| 745 | assert resp.headers["X-Foo"] == "a header" |
| 746 | |
| 747 | |
| 748 | def test_teardown_request_handler(app, client): |