@@ -49,14 +49,14 @@ async def test_register_get_delete_function_job(
4949 client : TestClient ,
5050 add_user_function_api_access_rights : None ,
5151 webserver_rpc_client : WebServerRpcClient ,
52- mock_function_factory : Callable [[FunctionClass ], Function ],
52+ create_fake_function_obj : Callable [[FunctionClass ], Function ],
5353 logged_user : UserInfoDict ,
5454 other_logged_user : UserInfoDict ,
5555 osparc_product_name : ProductName ,
5656):
5757 # Register the function first
5858 registered_function = await webserver_rpc_client .functions .register_function (
59- function = mock_function_factory (FunctionClass .PROJECT ),
59+ function = create_fake_function_obj (FunctionClass .PROJECT ),
6060 user_id = logged_user ["id" ],
6161 product_name = osparc_product_name ,
6262 )
@@ -168,13 +168,13 @@ async def test_list_function_jobs(
168168 client : TestClient ,
169169 add_user_function_api_access_rights : None ,
170170 webserver_rpc_client : WebServerRpcClient ,
171- mock_function_factory : Callable [[FunctionClass ], Function ],
171+ create_fake_function_obj : Callable [[FunctionClass ], Function ],
172172 logged_user : UserInfoDict ,
173173 osparc_product_name : ProductName ,
174174):
175175 # Register the function first
176176 registered_function = await webserver_rpc_client .functions .register_function (
177- function = mock_function_factory (FunctionClass .PROJECT ),
177+ function = create_fake_function_obj (FunctionClass .PROJECT ),
178178 user_id = logged_user ["id" ],
179179 product_name = osparc_product_name ,
180180 )
@@ -218,13 +218,13 @@ async def test_list_function_jobs_with_status(
218218 client : TestClient ,
219219 add_user_function_api_access_rights : None ,
220220 webserver_rpc_client : WebServerRpcClient ,
221- mock_function_factory : Callable [[FunctionClass ], Function ],
221+ create_fake_function_obj : Callable [[FunctionClass ], Function ],
222222 logged_user : UserInfoDict ,
223223 osparc_product_name : ProductName ,
224224):
225225 # Register the function first
226226 registered_function = await webserver_rpc_client .functions .register_function (
227- function = mock_function_factory (FunctionClass .PROJECT ),
227+ function = create_fake_function_obj (FunctionClass .PROJECT ),
228228 user_id = logged_user ["id" ],
229229 product_name = osparc_product_name ,
230230 )
@@ -268,19 +268,19 @@ async def test_list_function_jobs_with_status(
268268async def test_list_function_jobs_filtering (
269269 client : TestClient ,
270270 webserver_rpc_client : WebServerRpcClient ,
271- mock_function_factory : Callable [[FunctionClass ], Function ],
271+ create_fake_function_obj : Callable [[FunctionClass ], Function ],
272272 logged_user : UserInfoDict ,
273273 osparc_product_name : ProductName ,
274274 add_user_function_api_access_rights : None ,
275275):
276276 # Register the function first
277277 first_registered_function = await webserver_rpc_client .functions .register_function (
278- function = mock_function_factory (FunctionClass .PROJECT ),
278+ function = create_fake_function_obj (FunctionClass .PROJECT ),
279279 user_id = logged_user ["id" ],
280280 product_name = osparc_product_name ,
281281 )
282282 second_registered_function = await webserver_rpc_client .functions .register_function (
283- function = mock_function_factory (FunctionClass .PROJECT ),
283+ function = create_fake_function_obj (FunctionClass .PROJECT ),
284284 user_id = logged_user ["id" ],
285285 product_name = osparc_product_name ,
286286 )
@@ -410,12 +410,12 @@ async def test_find_cached_function_jobs(
410410 logged_user : UserInfoDict ,
411411 other_logged_user : UserInfoDict ,
412412 osparc_product_name : ProductName ,
413- mock_function_factory : Callable [[FunctionClass ], Function ],
413+ create_fake_function_obj : Callable [[FunctionClass ], Function ],
414414 clean_functions : None ,
415415):
416416 # Register the function first
417417 registered_function = await webserver_rpc_client .functions .register_function (
418- function = mock_function_factory (FunctionClass .PROJECT ),
418+ function = create_fake_function_obj (FunctionClass .PROJECT ),
419419 user_id = logged_user ["id" ],
420420 product_name = osparc_product_name ,
421421 )
@@ -521,12 +521,12 @@ async def test_patch_registered_function_jobs(
521521 logged_user : UserInfoDict ,
522522 other_logged_user : UserInfoDict ,
523523 osparc_product_name : ProductName ,
524- mock_function_factory : Callable [[FunctionClass ], Function ],
524+ create_fake_function_obj : Callable [[FunctionClass ], Function ],
525525 clean_functions : None ,
526526 function_job : RegisteredFunctionJob ,
527527 patch : RegisteredFunctionJobPatch ,
528528):
529- function = mock_function_factory (function_job .function_class )
529+ function = create_fake_function_obj (function_job .function_class )
530530
531531 registered_function = await webserver_rpc_client .functions .register_function (
532532 function = function ,
@@ -597,12 +597,12 @@ async def test_incompatible_patch_model_error(
597597 logged_user : UserInfoDict ,
598598 other_logged_user : UserInfoDict ,
599599 osparc_product_name : ProductName ,
600- mock_function_factory : Callable [[FunctionClass ], Function ],
600+ create_fake_function_obj : Callable [[FunctionClass ], Function ],
601601 clean_functions : None ,
602602 function_job : RegisteredFunctionJob ,
603603 patch : RegisteredFunctionJobPatch ,
604604):
605- function = mock_function_factory (function_job .function_class )
605+ function = create_fake_function_obj (function_job .function_class )
606606
607607 registered_function = await webserver_rpc_client .functions .register_function (
608608 function = function ,
@@ -644,7 +644,7 @@ async def test_update_function_job_status_output(
644644 add_user_function_api_access_rights : None ,
645645 logged_user : UserInfoDict ,
646646 other_logged_user : UserInfoDict ,
647- mock_function_factory : Callable [[FunctionClass ], Function ],
647+ create_fake_function_obj : Callable [[FunctionClass ], Function ],
648648 osparc_product_name : ProductName ,
649649 access_by_other_user : bool ,
650650 check_write_permissions : bool ,
@@ -653,7 +653,7 @@ async def test_update_function_job_status_output(
653653):
654654 # Register the function first
655655 registered_function = await webserver_rpc_client .functions .register_function (
656- function = mock_function_factory (FunctionClass .PROJECT ),
656+ function = create_fake_function_obj (FunctionClass .PROJECT ),
657657 user_id = logged_user ["id" ],
658658 product_name = osparc_product_name ,
659659 )
@@ -738,12 +738,12 @@ async def test_update_function_job_outputs(
738738 webserver_rpc_client : WebServerRpcClient ,
739739 add_user_function_api_access_rights : None ,
740740 logged_user : UserInfoDict ,
741- mock_function_factory : Callable [[FunctionClass ], Function ],
741+ create_fake_function_obj : Callable [[FunctionClass ], Function ],
742742 osparc_product_name : ProductName ,
743743):
744744 # Register the function first
745745 registered_function = await webserver_rpc_client .functions .register_function (
746- function = mock_function_factory (FunctionClass .PROJECT ),
746+ function = create_fake_function_obj (FunctionClass .PROJECT ),
747747 user_id = logged_user ["id" ],
748748 product_name = osparc_product_name ,
749749 )
0 commit comments