(app: Quart)
| 40 | |
| 41 | |
| 42 | async def test_default_template_context(app: Quart) -> None: |
| 43 | async with app.app_context(): |
| 44 | g.foo = "bar" |
| 45 | rendered = await render_template_string("{{ g.foo }}") |
| 46 | assert rendered == "bar" |
| 47 | async with app.test_request_context("/"): |
| 48 | session["foo"] = "bar" |
| 49 | rendered = await render_template_string( |
| 50 | "{{ request.method }} {{ request.path }} {{ session.foo }}" |
| 51 | ) |
| 52 | assert rendered == "GET / bar" |
| 53 | |
| 54 | |
| 55 | async def test_template_context_processors(app: Quart, blueprint: Blueprint) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…