(app)
| 133 | |
| 134 | |
| 135 | def test_manual_context_binding(app): |
| 136 | @app.route("/") |
| 137 | def index(): |
| 138 | return f"Hello {flask.request.args['name']}!" |
| 139 | |
| 140 | ctx = app.test_request_context("/?name=World") |
| 141 | ctx.push() |
| 142 | assert index() == "Hello World!" |
| 143 | ctx.pop() |
| 144 | with pytest.raises(RuntimeError): |
| 145 | index() |
| 146 | |
| 147 | |
| 148 | @pytest.mark.skipif(greenlet is None, reason="greenlet not installed") |
nothing calls this directly
no test coverage detected
searching dependent graphs…