MCPcopy Create free account
hub / github.com/pallets/quart / test_data

Function test_data

tests/test_testing.py:257–268  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

255
256
257async def test_data() -> None:
258 app = Quart(__name__)
259
260 @app.route("/", methods=["POST"])
261 async def echo() -> str:
262 data = await request.get_data(as_text=True)
263 return data # type: ignore
264
265 client = Client(app)
266 headers = {"Content-Type": "application/octet-stream"}
267 response = await client.post("/", data=b"ABCDEFG", headers=headers)
268 assert (await response.get_data(as_text=False)) == b"ABCDEFG"
269
270
271async def test_query_string() -> None:

Callers

nothing calls this directly

Calls 3

QuartClass · 0.90
postMethod · 0.45
get_dataMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…