diff --git a/tests/test_stringified_annotations_simple.py b/tests/test_stringified_annotations_simple.py index eea0ac23d..9bd6d09d6 100644 --- a/tests/test_stringified_annotations_simple.py +++ b/tests/test_stringified_annotations_simple.py @@ -7,16 +7,17 @@ from typing_extensions import Annotated from .utils import needs_py310 +class Dep: + def __call__(self, request: Request): + return "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}