MCPcopy Create free account
hub / github.com/pallets/flask / test_iterable_loader

Function test_iterable_loader

tests/test_templating.py:342–359  ·  view source on GitHub ↗
(app, client)

Source from the content-addressed store, hash-verified

340
341
342def 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
362def test_templates_auto_reload(app):

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected