MCPcopy Index your code
hub / github.com/pallets/quart / test_simple_stream

Function test_simple_stream

tests/test_templating.py:144–159  ·  view source on GitHub ↗
(app: Quart)

Source from the content-addressed store, hash-verified

142
143
144async 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"

Callers

nothing calls this directly

Calls 2

test_clientMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected