diff --git a/tests/test_stringified_annotations_simple.py b/tests/test_stringified_annotations_simple.py index 1a79590f2..eea0ac23d 100644 --- a/tests/test_stringified_annotations_simple.py +++ b/tests/test_stringified_annotations_simple.py @@ -6,22 +6,20 @@ from typing_extensions import Annotated from .utils import needs_py310 -app = FastAPI() - -client = TestClient(app) - - -class Dep: - def __call__(self, request: Request): - return "test" - - -@app.get("/test/") -def call(test: Annotated[str, Depends(Dep())]): - return {"test": test} - @needs_py310 def test_stringified_annotations(): + app = FastAPI() + + client = TestClient(app) + + class Dep: + def __call__(self, request: Request): + return "test" + + @app.get("/test/") + def call(test: Annotated[str, Depends(Dep())]): + return {"test": test} + response = client.get("/test") assert response.status_code == 200