99from aiohttp .test_utils import TestClient
1010from common_library .users_enums import UserRole
1111from faker import Faker
12- from models_library .api_schemas_webserver .functions import (
13- ProjectFunctionJob ,
14- )
12+ from models_library .api_schemas_webserver .functions import ProjectFunctionJob
1513from models_library .functions import (
1614 Function ,
1715 FunctionClass ,
@@ -234,14 +232,14 @@ async def test_list_function_jobs_with_status(
234232 client : TestClient ,
235233 add_user_function_api_access_rights : None ,
236234 rpc_client : RabbitMQRPCClient ,
237- mock_function : ProjectFunction ,
235+ mock_function_factory : Callable [[ FunctionClass ], Function ] ,
238236 logged_user : UserInfoDict ,
239237 osparc_product_name : ProductName ,
240238):
241239 # Register the function first
242240 registered_function = await functions_rpc .register_function (
243241 rabbitmq_rpc_client = rpc_client ,
244- function = mock_function ,
242+ function = mock_function_factory ( FunctionClass . PROJECT ) ,
245243 user_id = logged_user ["id" ],
246244 product_name = osparc_product_name ,
247245 )
@@ -254,6 +252,7 @@ async def test_list_function_jobs_with_status(
254252 project_job_id = uuid4 (),
255253 inputs = {"input1" : "value1" },
256254 outputs = {"output1" : "result1" },
255+ job_creation_task_id = None ,
257256 )
258257
259258 # Register the function job
0 commit comments