(app: Quart)
| 142 | |
| 143 | |
| 144 | async def test_simple_stream(app: Quart) -> None: |
| 145 | @app.get("/") |
| 146 | async def index() -> ResponseReturnValue: |
| 147 | return await stream_template_string("{{ config }}", config=42) # type: ignore |
| 148 | |
| 149 | test_client = app.test_client() |
| 150 | response = await test_client.get("/") |
| 151 | assert (await response.data) == b"42" |
| 152 | |
| 153 | @app.get("/2") |
| 154 | async def index2() -> ResponseReturnValue: |
| 155 | return Response(await stream_template_string("{{ config }}", config=43)) |
| 156 | |
| 157 | test_client = app.test_client() |
| 158 | response = await test_client.get("/2") |
| 159 | assert (await response.data) == b"43" |
nothing calls this directly
no test coverage detected