diff --git a/tests/test_form_default.py b/tests/test_form_default.py index b2d9177fc..2a12049d1 100644 --- a/tests/test_form_default.py +++ b/tests/test_form_default.py @@ -5,7 +5,6 @@ from starlette.testclient import TestClient from typing_extensions import Annotated app = FastAPI() -client = TestClient(app) @app.post("/urlencoded") @@ -21,6 +20,9 @@ async def post_multi_part( return {"file": file, "age": age} +client = TestClient(app) + + def test_form_default_url_encoded(): response = client.post("/urlencoded", data={"age": ""}) assert response.status_code == 200