()
| 213 | |
| 214 | |
| 215 | async 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 | |
| 228 | async def test_form() -> None: |