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

Function test_form

tests/test_testing.py:228–238  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

226
227
228async def test_form() -> None:
229 app = Quart(__name__)
230
231 @app.route("/", methods=["POST"])
232 async def echo() -> Response:
233 data = await request.form
234 return jsonify(**data)
235
236 client = Client(app)
237 response = await client.post("/", form={"a": "b"})
238 assert (await response.get_json()) == {"a": "b"}
239
240
241async def test_files() -> 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…