File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
packages/service-library/tests/fastapi/long_running_tasks Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 33
44import asyncio
55from collections .abc import AsyncIterable
6- from typing import Final
6+ from typing import Annotated , Final
77
88import pytest
99from asgi_lifespan import LifespanManager
@@ -56,18 +56,18 @@ def user_routes() -> APIRouter:
5656
5757 @router .get ("/api/success" , status_code = status .HTTP_200_OK )
5858 async def create_task_user_defined_route (
59- long_running_manager : FastAPILongRunningManager = Depends (
60- get_long_running_manager
61- ) ,
59+ long_running_manager : Annotated [
60+ FastAPILongRunningManager , Depends ( get_long_running_manager )
61+ ] ,
6262 ) -> TaskId :
6363 task_id = start_task (long_running_manager .tasks_manager , task = a_test_task )
6464 return task_id
6565
6666 @router .get ("/api/failing" , status_code = status .HTTP_200_OK )
6767 async def create_task_which_fails (
68- long_running_manager : FastAPILongRunningManager = Depends (
69- get_long_running_manager
70- ) ,
68+ long_running_manager : Annotated [
69+ FastAPILongRunningManager , Depends ( get_long_running_manager )
70+ ] ,
7171 ) -> TaskId :
7272 task_id = start_task (
7373 long_running_manager .tasks_manager , task = a_failing_test_task
You can’t perform that action at this time.
0 commit comments