Skip to content

Commit 851c5be

Browse files
fix tests
1 parent 9572145 commit 851c5be

File tree

10 files changed

+16
-16
lines changed

10 files changed

+16
-16
lines changed

services/web/server/tests/unit/with_dbs/02/conftest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ def mock_catalog_api(
9292
) -> dict[str, mock.Mock]:
9393
return {
9494
"get_service_resources": mocker.patch(
95-
"simcore_service_webserver.projects.projects_api.catalog_client.get_service_resources",
95+
"simcore_service_webserver.projects.projects_service.catalog_client.get_service_resources",
9696
return_value=mock_service_resources,
9797
autospec=True,
9898
),
9999
"get_service": mocker.patch(
100-
"simcore_service_webserver.projects.projects_api.catalog_client.get_service",
100+
"simcore_service_webserver.projects.projects_service.catalog_client.get_service",
101101
return_value=mock_service,
102102
autospec=True,
103103
),
@@ -374,7 +374,7 @@ def mock_get_total_project_dynamic_nodes_creation_interval(
374374
) -> None:
375375
_VERY_LONG_LOCK_TIMEOUT_S: Final[float] = 300
376376
mocker.patch(
377-
"simcore_service_webserver.projects.projects_api._nodes_api"
377+
"simcore_service_webserver.projects.projects_service._nodes_api"
378378
".get_total_project_dynamic_nodes_creation_interval",
379379
return_value=_VERY_LONG_LOCK_TIMEOUT_S,
380380
)

services/web/server/tests/unit/with_dbs/02/test_projects_nodes_handlers__patch.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def mock_project_uses_available_services(mocker: MockerFixture):
4747
@pytest.fixture
4848
def mock_catalog_rpc_check_for_service(mocker: MockerFixture):
4949
mocker.patch(
50-
"simcore_service_webserver.projects.projects_api.catalog_rpc.check_for_service",
50+
"simcore_service_webserver.projects.projects_service.catalog_rpc.check_for_service",
5151
spec=True,
5252
return_value=True,
5353
)
@@ -56,7 +56,7 @@ def mock_catalog_rpc_check_for_service(mocker: MockerFixture):
5656
@pytest.fixture
5757
def mocked_notify_project_node_update(mocker: MockerFixture):
5858
return mocker.patch(
59-
"simcore_service_webserver.projects.projects_api.notify_project_node_update",
59+
"simcore_service_webserver.projects.projects_service.notify_project_node_update",
6060
)
6161

6262

@@ -362,14 +362,14 @@ async def test_patch_project_node_service_key_with_error(
362362
_patch_version = {"version": "2.0.9"}
363363

364364
with mocker.patch(
365-
"simcore_service_webserver.projects.projects_api.catalog_rpc.check_for_service",
365+
"simcore_service_webserver.projects.projects_service.catalog_rpc.check_for_service",
366366
side_effect=CatalogForbiddenError(name="test"),
367367
):
368368
resp = await client.patch(f"{base_url}", json=_patch_version)
369369
assert resp.status == status.HTTP_403_FORBIDDEN
370370

371371
with mocker.patch(
372-
"simcore_service_webserver.projects.projects_api.catalog_rpc.check_for_service",
372+
"simcore_service_webserver.projects.projects_service.catalog_rpc.check_for_service",
373373
side_effect=CatalogItemNotFoundError(name="test"),
374374
):
375375
resp = await client.patch(f"{base_url}", json=_patch_version)

services/web/server/tests/unit/with_dbs/02/test_projects_nodes_pricing_unit_handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def _fake_instance_type_details(
136136
]
137137

138138
return mocker.patch(
139-
"simcore_service_webserver.projects.projects_api.get_instance_type_details",
139+
"simcore_service_webserver.projects.projects_service.get_instance_type_details",
140140
side_effect=_fake_instance_type_details,
141141
)
142142

services/web/server/tests/unit/with_dbs/03/version_control/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,11 +254,11 @@ async def request_delete_project(
254254
mocker: MockerFixture,
255255
) -> AsyncIterator[Callable[[TestClient, UUID], Awaitable]]:
256256
director_v2_api_delete_pipeline: mock.AsyncMock = mocker.patch(
257-
"simcore_service_webserver.projects.projects_api.director_v2_api.delete_pipeline",
257+
"simcore_service_webserver.projects.projects_service.director_v2_api.delete_pipeline",
258258
autospec=True,
259259
)
260260
dynamic_scheduler_api_stop_dynamic_services_in_project: mock.AsyncMock = mocker.patch(
261-
"simcore_service_webserver.projects.projects_api.dynamic_scheduler_api.stop_dynamic_services_in_project",
261+
"simcore_service_webserver.projects.projects_service.dynamic_scheduler_api.stop_dynamic_services_in_project",
262262
autospec=True,
263263
)
264264
fire_and_forget_call_to_storage: mock.Mock = mocker.patch(

services/web/server/tests/unit/with_dbs/04/folders/test_folders.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ def mock_storage_delete_data_folders(mocker: MockerFixture) -> mock.Mock:
387387
autospec=True,
388388
)
389389
mocker.patch(
390-
"simcore_service_webserver.projects.projects_api.remove_project_dynamic_services",
390+
"simcore_service_webserver.projects.projects_service.remove_project_dynamic_services",
391391
autospec=True,
392392
)
393393
mocker.patch(

services/web/server/tests/unit/with_dbs/04/garbage_collector/test_resource_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ async def test_interactive_services_remain_after_websocket_reconnection_from_2_t
657657
async def mocked_notification_system(mocker):
658658
mocks = {}
659659
mocked_notification_system = mocker.patch(
660-
"simcore_service_webserver.projects.projects_api.retrieve_and_notify_project_locked_state",
660+
"simcore_service_webserver.projects.projects_service.retrieve_and_notify_project_locked_state",
661661
return_value=Future(),
662662
)
663663
mocked_notification_system.return_value.set_result("")

services/web/server/tests/unit/with_dbs/04/studies_dispatcher/test_studies_dispatcher_handlers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ def mocks_on_projects_api(mocker) -> None:
302302
All projects in this module are UNLOCKED
303303
"""
304304
mocker.patch(
305-
"simcore_service_webserver.projects.projects_api._get_project_lock_state",
305+
"simcore_service_webserver.projects.projects_service._get_project_lock_state",
306306
return_value=ProjectLocked(value=False, status=ProjectStatus.CLOSED),
307307
)
308308

services/web/server/tests/unit/with_dbs/04/studies_dispatcher/test_studies_dispatcher_studies_access.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def mocks_on_projects_api(mocker: MockerFixture) -> None:
132132
All projects in this module are UNLOCKED
133133
"""
134134
mocker.patch(
135-
"simcore_service_webserver.projects.projects_api._get_project_lock_state",
135+
"simcore_service_webserver.projects.projects_service._get_project_lock_state",
136136
return_value=ProjectLocked(value=False, status=ProjectStatus.CLOSED),
137137
)
138138

services/web/server/tests/unit/with_dbs/04/workspaces/test_workspaces__folders_and_projects_crud.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ def mock_storage_delete_data_folders(mocker: MockerFixture) -> mock.Mock:
259259
autospec=True,
260260
)
261261
mocker.patch(
262-
"simcore_service_webserver.projects.projects_api.remove_project_dynamic_services",
262+
"simcore_service_webserver.projects.projects_service.remove_project_dynamic_services",
263263
autospec=True,
264264
)
265265
mocker.patch(

services/web/server/tests/unit/with_dbs/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ async def _mock_result():
369369
)
370370

371371
mock2 = mocker.patch(
372-
"simcore_service_webserver.projects.projects_api.storage_api.delete_data_folders_of_project_node",
372+
"simcore_service_webserver.projects.projects_service.storage_api.delete_data_folders_of_project_node",
373373
autospec=True,
374374
return_value=None,
375375
)

0 commit comments

Comments
 (0)