|
41 | 41 | from models_library.users import UserID |
42 | 42 | from pytest_mock import MockerFixture, MockType |
43 | 43 | from pytest_simcore.helpers.httpx_calls_capture_models import HttpApiCallCaptureModel |
| 44 | +from pytest_simcore.helpers.typing_mock import HandlerMockFactory |
44 | 45 | from servicelib.celery.models import ExecutionMetadata, TaskID, TasksQueue |
45 | 46 | from servicelib.common_headers import ( |
46 | 47 | X_SIMCORE_PARENT_NODE_ID, |
@@ -165,9 +166,7 @@ async def test_with_fake_run_function( |
165 | 166 | auth: BasicAuth, |
166 | 167 | mocker: MockerFixture, |
167 | 168 | with_api_server_celery_worker: TestWorkController, |
168 | | - mock_handler_in_functions_rpc_interface: Callable[ |
169 | | - [str, Any, Exception | None, Callable | None], None |
170 | | - ], |
| 169 | + mock_handler_in_functions_rpc_interface: HandlerMockFactory, |
171 | 170 | fake_registered_project_function: RegisteredProjectFunction, |
172 | 171 | fake_registered_project_function_job: RegisteredFunctionJob, |
173 | 172 | user_id: UserID, |
@@ -316,9 +315,7 @@ async def test_run_project_function_parent_info( |
316 | 315 | app: FastAPI, |
317 | 316 | with_api_server_celery_worker: TestWorkController, |
318 | 317 | client: AsyncClient, |
319 | | - mock_handler_in_functions_rpc_interface: Callable[ |
320 | | - [str, Any, Exception | None, Callable | None], None |
321 | | - ], |
| 318 | + mock_handler_in_functions_rpc_interface: HandlerMockFactory, |
322 | 319 | fake_registered_project_function: RegisteredProjectFunction, |
323 | 320 | fake_registered_project_function_job: RegisteredFunctionJob, |
324 | 321 | auth: httpx.BasicAuth, |
@@ -432,9 +429,7 @@ async def test_map_function_parent_info( |
432 | 429 | app: FastAPI, |
433 | 430 | with_api_server_celery_worker: TestWorkController, |
434 | 431 | client: AsyncClient, |
435 | | - mock_handler_in_functions_rpc_interface: Callable[ |
436 | | - [str, Any, Exception | None, Callable | None], MockType |
437 | | - ], |
| 432 | + mock_handler_in_functions_rpc_interface: HandlerMockFactory, |
438 | 433 | fake_registered_project_function: RegisteredProjectFunction, |
439 | 434 | fake_registered_project_function_job: RegisteredFunctionJob, |
440 | 435 | auth: httpx.BasicAuth, |
@@ -556,9 +551,7 @@ async def test_map_function( |
556 | 551 | app: FastAPI, |
557 | 552 | with_api_server_celery_worker: TestWorkController, |
558 | 553 | client: AsyncClient, |
559 | | - mock_handler_in_functions_rpc_interface: Callable[ |
560 | | - [str, Any, Exception | None, Callable | None], MockType |
561 | | - ], |
| 554 | + mock_handler_in_functions_rpc_interface: HandlerMockFactory, |
562 | 555 | fake_registered_project_function: RegisteredProjectFunction, |
563 | 556 | fake_registered_project_function_job: RegisteredFunctionJob, |
564 | 557 | auth: httpx.BasicAuth, |
|
0 commit comments