Skip to content

Commit 7db145b

Browse files
author
Andrei Neagu
committed
adjusted tests
1 parent ac534be commit 7db145b

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
import json
77
import random
88
from collections.abc import Awaitable, Callable
9+
from unittest.mock import MagicMock
910

1011
import aiopg
1112
import aiopg.sa
1213
import pytest
1314
from aiohttp.test_utils import TestClient
14-
from conftest import MagicMock
1515
from faker import Faker
1616
from models_library.api_schemas_webserver.projects_metadata import (
1717
ProjectMetadataGet,

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,9 @@ async def test_close_project(
821821
)
822822
mocked_director_v2_api[
823823
"dynamic_scheduler.api.list_dynamic_services"
824-
].assert_any_call(client.app, user_id, user_project["uuid"])
824+
].assert_any_call(
825+
client.app, user_id=user_id, project_id=ProjectID(user_project["uuid"])
826+
)
825827
mocked_director_v2_api[
826828
"dynamic_scheduler.api.list_dynamic_services"
827829
].reset_mock()
@@ -844,7 +846,7 @@ async def test_close_project(
844846
call(
845847
client.app,
846848
user_id=user_id,
847-
project_id=user_project["uuid"],
849+
project_id=ProjectID(user_project["uuid"]),
848850
),
849851
]
850852
mocked_director_v2_api[

services/web/server/tests/unit/with_dbs/03/test_trash.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ async def test_trash_projects( # noqa: PLR0915
8888
autospec=True,
8989
)
9090
mocker.patch(
91-
"simcore_service_webserver.projects._trash_api.director_v2_api.list_dynamic_services",
91+
"simcore_service_webserver.projects._trash_api.dynamic_scheduler_api.list_dynamic_services",
9292
return_value=[mocker.MagicMock()] if is_project_running else [],
9393
autospec=True,
9494
)

0 commit comments

Comments
 (0)