From 95b7e824bf8de5bfaa5995b25a8d7f0bcad96eae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Tue, 2 Dec 2025 05:26:59 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20Tweak=20tests=20to=20keep=20the=20s?= =?UTF-8?q?ame=20conventions=20as=20the=20rest=20of=20the=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_form_default.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/test_form_default.py b/tests/test_form_default.py index 553a1041c..b2d9177fc 100644 --- a/tests/test_form_default.py +++ b/tests/test_form_default.py @@ -13,21 +13,21 @@ async def post_url_encoded(age: Annotated[Optional[int], Form()] = None): return age -def test_form_default_url_encoded(): - response = client.post("/urlencoded", data={"age": ""}) - assert response.status_code == 200 - assert response.text == "null" - - @app.post("/multipart") async def post_multi_part( age: Annotated[Optional[int], Form()] = None, file: Annotated[Optional[bytes], File()] = None, ): - assert file is None - assert age is None + return {"file": file, "age": age} + + +def test_form_default_url_encoded(): + response = client.post("/urlencoded", data={"age": ""}) + assert response.status_code == 200 + assert response.text == "null" def test_form_default_multi_part(): response = client.post("/multipart", data={"age": ""}) assert response.status_code == 200 + assert response.json() == {"file": None, "age": None}