Skip to content

Commit 1223c8b

Browse files
committed
this is how to fix the tests
1 parent e98751a commit 1223c8b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ async def test_copying_large_project_and_retrieving_copy_task(
193193
@pytest.mark.parametrize(*_standard_user_role_response())
194194
async def test_creating_new_project_from_template_without_copying_data_creates_skeleton(
195195
mock_dynamic_scheduler: None,
196+
mocked_dynamic_services_interface: dict[str, MagicMock],
196197
client: TestClient,
197198
logged_user: dict[str, Any],
198199
primary_group: dict[str, str],

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from http import HTTPStatus
1010
from math import ceil
1111
from typing import Any
12+
from unittest import mock
1213

1314
import pytest
1415
import sqlalchemy as sa
@@ -190,6 +191,7 @@ async def _assert_get_same_project(
190191
)
191192
async def test_list_projects(
192193
client: TestClient,
194+
mocked_dynamic_services_interface: dict[str, mock.MagicMock],
193195
logged_user: dict[str, Any],
194196
user_project: dict[str, Any],
195197
template_project: dict[str, Any],
@@ -338,6 +340,7 @@ async def logged_user_registed_in_two_products(
338340
async def test_list_projects_with_innaccessible_services(
339341
s4l_products_db_name: ProductName,
340342
client: TestClient,
343+
mocked_dynamic_services_interface: dict[str, mock.MagicMock],
341344
logged_user_registed_in_two_products: UserInfoDict,
342345
user_project: dict[str, Any],
343346
template_project: dict[str, Any],
@@ -395,6 +398,7 @@ async def test_list_projects_with_innaccessible_services(
395398
)
396399
async def test_get_project(
397400
client: TestClient,
401+
mocked_dynamic_services_interface: dict[str, mock.MagicMock],
398402
logged_user: UserInfoDict,
399403
user_project: ProjectDict,
400404
template_project: ProjectDict,
@@ -479,6 +483,7 @@ async def test_create_get_and_patch_project_ui_field(
479483
@pytest.mark.parametrize(*standard_user_role_response())
480484
async def test_new_project_from_template(
481485
mock_dynamic_scheduler: None,
486+
mocked_dynamic_services_interface: dict[str, mock.MagicMock],
482487
client: TestClient,
483488
logged_user: UserInfoDict,
484489
primary_group: dict[str, str],
@@ -506,6 +511,7 @@ async def test_new_project_from_template(
506511
@pytest.mark.parametrize(*standard_user_role_response())
507512
async def test_new_project_from_other_study(
508513
mock_dynamic_scheduler: None,
514+
mocked_dynamic_services_interface: dict[str, mock.MagicMock],
509515
client: TestClient,
510516
logged_user: UserInfoDict,
511517
primary_group: dict[str, str],
@@ -589,6 +595,7 @@ async def test_new_project_from_template_with_body(
589595
@pytest.mark.parametrize(*standard_user_role_response())
590596
async def test_new_template_from_project(
591597
mock_dynamic_scheduler: None,
598+
mocked_dynamic_services_interface: dict[str, mock.MagicMock],
592599
client: TestClient,
593600
logged_user: dict[str, Any],
594601
primary_group: dict[str, str],

0 commit comments

Comments
 (0)