|
9 | 9 | from http import HTTPStatus |
10 | 10 | from math import ceil |
11 | 11 | from typing import Any |
| 12 | +from unittest import mock |
12 | 13 |
|
13 | 14 | import pytest |
14 | 15 | import sqlalchemy as sa |
@@ -190,6 +191,7 @@ async def _assert_get_same_project( |
190 | 191 | ) |
191 | 192 | async def test_list_projects( |
192 | 193 | client: TestClient, |
| 194 | + mocked_dynamic_services_interface: dict[str, mock.MagicMock], |
193 | 195 | logged_user: dict[str, Any], |
194 | 196 | user_project: dict[str, Any], |
195 | 197 | template_project: dict[str, Any], |
@@ -338,6 +340,7 @@ async def logged_user_registed_in_two_products( |
338 | 340 | async def test_list_projects_with_innaccessible_services( |
339 | 341 | s4l_products_db_name: ProductName, |
340 | 342 | client: TestClient, |
| 343 | + mocked_dynamic_services_interface: dict[str, mock.MagicMock], |
341 | 344 | logged_user_registed_in_two_products: UserInfoDict, |
342 | 345 | user_project: dict[str, Any], |
343 | 346 | template_project: dict[str, Any], |
@@ -395,6 +398,7 @@ async def test_list_projects_with_innaccessible_services( |
395 | 398 | ) |
396 | 399 | async def test_get_project( |
397 | 400 | client: TestClient, |
| 401 | + mocked_dynamic_services_interface: dict[str, mock.MagicMock], |
398 | 402 | logged_user: UserInfoDict, |
399 | 403 | user_project: ProjectDict, |
400 | 404 | template_project: ProjectDict, |
@@ -479,6 +483,7 @@ async def test_create_get_and_patch_project_ui_field( |
479 | 483 | @pytest.mark.parametrize(*standard_user_role_response()) |
480 | 484 | async def test_new_project_from_template( |
481 | 485 | mock_dynamic_scheduler: None, |
| 486 | + mocked_dynamic_services_interface: dict[str, mock.MagicMock], |
482 | 487 | client: TestClient, |
483 | 488 | logged_user: UserInfoDict, |
484 | 489 | primary_group: dict[str, str], |
@@ -506,6 +511,7 @@ async def test_new_project_from_template( |
506 | 511 | @pytest.mark.parametrize(*standard_user_role_response()) |
507 | 512 | async def test_new_project_from_other_study( |
508 | 513 | mock_dynamic_scheduler: None, |
| 514 | + mocked_dynamic_services_interface: dict[str, mock.MagicMock], |
509 | 515 | client: TestClient, |
510 | 516 | logged_user: UserInfoDict, |
511 | 517 | primary_group: dict[str, str], |
@@ -589,6 +595,7 @@ async def test_new_project_from_template_with_body( |
589 | 595 | @pytest.mark.parametrize(*standard_user_role_response()) |
590 | 596 | async def test_new_template_from_project( |
591 | 597 | mock_dynamic_scheduler: None, |
| 598 | + mocked_dynamic_services_interface: dict[str, mock.MagicMock], |
592 | 599 | client: TestClient, |
593 | 600 | logged_user: dict[str, Any], |
594 | 601 | primary_group: dict[str, str], |
|
0 commit comments