(app, client)
| 9 | |
| 10 | |
| 11 | def test_context_processing(app, client): |
| 12 | @app.context_processor |
| 13 | def context_processor(): |
| 14 | return {"injected_value": 42} |
| 15 | |
| 16 | @app.route("/") |
| 17 | def index(): |
| 18 | return flask.render_template("context_template.html", value=23) |
| 19 | |
| 20 | rv = client.get("/") |
| 21 | assert rv.data == b"<p>23|42" |
| 22 | |
| 23 | |
| 24 | def test_original_win(app, client): |