File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
services/director-v2/tests/unit/with_dbs Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 4747from simcore_service_director_v2 .models .comp_runs import RunMetadataDict
4848from simcore_service_director_v2 .models .comp_tasks import CompTaskAtDB
4949from simcore_service_director_v2 .modules .dask_clients_pool import DaskClientsPool
50+ from simcore_service_director_v2 .modules .osparc_variables import substitutions
5051from simcore_service_director_v2 .utils .dask import (
5152 _LOGS_FILE_NAME ,
5253 _to_human_readable_resource_values ,
@@ -507,6 +508,14 @@ def _app_config_with_dask_client(
507508 )
508509
509510
511+ @pytest .fixture
512+ def mock_rpc_calls (mocker : MockerFixture , initialized_app : FastAPI ) -> None :
513+ initialized_app .state .rabbitmq_rpc_client = mock .AsyncMock ()
514+ mocker .patch .object (
515+ substitutions , "get_product_api_base_url" , return_value = "https://osparc.io"
516+ )
517+
518+
510519async def test_check_if_cluster_is_able_to_run_pipeline (
511520 _app_config_with_dask_client : None ,
512521 project_id : ProjectID ,
@@ -614,6 +623,7 @@ async def test_compute_task_envs(
614623 input_task_envs : ContainerEnvsDict ,
615624 expected_computed_task_envs : ContainerEnvsDict ,
616625 resource_tracking_run_id : ServiceRunID ,
626+ mock_rpc_calls : None ,
617627):
618628 sleeper_task : CompTaskAtDB = published_project .tasks [1 ]
619629 sleeper_task .image .envs = input_task_envs
You can’t perform that action at this time.
0 commit comments