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

Function test_json

tests/test_testing.py:215–225  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

213
214
215async def test_json() -> None:
216 app = Quart(__name__)
217
218 @app.route("/", methods=["POST"])
219 async def echo() -> Response:
220 data = await request.get_json()
221 return jsonify(data)
222
223 client = Client(app)
224 response = await client.post("/", json={"a": "b"})
225 assert (await response.get_json()) == {"a": "b"}
226
227
228async def test_form() -> None:

Callers

nothing calls this directly

Calls 3

QuartClass · 0.90
postMethod · 0.45
get_jsonMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…