(app, client)
| 340 | |
| 341 | |
| 342 | def test_iterable_loader(app, client): |
| 343 | @app.context_processor |
| 344 | def context_processor(): |
| 345 | return {"whiskey": "Jameson"} |
| 346 | |
| 347 | @app.route("/") |
| 348 | def index(): |
| 349 | return flask.render_template( |
| 350 | [ |
| 351 | "no_template.xml", # should skip this one |
| 352 | "simple_template.html", # should render this |
| 353 | "context_template.html", |
| 354 | ], |
| 355 | value=23, |
| 356 | ) |
| 357 | |
| 358 | rv = client.get("/") |
| 359 | assert rv.data == b"<h1>Jameson</h1>" |
| 360 | |
| 361 | |
| 362 | def test_templates_auto_reload(app): |