()
| 226 | |
| 227 | |
| 228 | async 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 | |
| 241 | async def test_files() -> None: |