From d689b007b77792628c3d58eefcf746914904d583 Mon Sep 17 00:00:00 2001 From: Lie Ryan Date: Mon, 22 Jan 2024 12:13:03 +1100 Subject: [PATCH] Rename tests/test_dependency_class.py -> tests/test_dependency_types.py --- ...dency_class.py => test_dependency_types.py} | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) rename tests/{test_dependency_class.py => test_dependency_types.py} (95%) diff --git a/tests/test_dependency_class.py b/tests/test_dependency_types.py similarity index 95% rename from tests/test_dependency_class.py rename to tests/test_dependency_types.py index 0233492e6..a011e69e8 100644 --- a/tests/test_dependency_class.py +++ b/tests/test_dependency_types.py @@ -49,54 +49,54 @@ methods_dependency = MethodsDependency() @app.get("/callable-dependency") -async def get_callable_dependency(value: str = Depends(callable_dependency)): +async def get_callable_dependency(value: str = Depends(callable_dependency)) -> str: return value @app.get("/callable-gen-dependency") -async def get_callable_gen_dependency(value: str = Depends(callable_gen_dependency)): +async def get_callable_gen_dependency(value: str = Depends(callable_gen_dependency)) -> str: return value @app.get("/async-callable-dependency") async def get_async_callable_dependency( value: str = Depends(async_callable_dependency), -): +) -> str: return value @app.get("/async-callable-gen-dependency") async def get_async_callable_gen_dependency( value: str = Depends(async_callable_gen_dependency), -): +) -> str: return value @app.get("/synchronous-method-dependency") async def get_synchronous_method_dependency( value: str = Depends(methods_dependency.synchronous), -): +) -> str: return value @app.get("/synchronous-method-gen-dependency") async def get_synchronous_method_gen_dependency( value: str = Depends(methods_dependency.synchronous_gen), -): +) -> str: return value @app.get("/asynchronous-method-dependency") async def get_asynchronous_method_dependency( value: str = Depends(methods_dependency.asynchronous), -): +) -> str: return value @app.get("/asynchronous-method-gen-dependency") async def get_asynchronous_method_gen_dependency( value: str = Depends(methods_dependency.asynchronous_gen), -): +) -> str: return value @@ -116,7 +116,7 @@ client = TestClient(app) ("/asynchronous-method-gen-dependency", "asynchronous-method-gen-dependency"), ], ) -def test_class_dependency(route, value): +def test_class_dependency(route: str, value: str) -> None: response = client.get(route, params={"value": value}) assert response.status_code == 200, response.text assert response.json() == value