|
11 | 11 | import aiopg.sa |
12 | 12 | import pytest |
13 | 13 | from aiohttp.test_utils import TestClient |
| 14 | +from conftest import MagicMock |
14 | 15 | from faker import Faker |
15 | 16 | from models_library.api_schemas_webserver.projects_metadata import ( |
16 | 17 | ProjectMetadataGet, |
|
40 | 41 | @pytest.mark.parametrize(*standard_user_role_response()) |
41 | 42 | async def test_custom_metadata_handlers( |
42 | 43 | # for deletion |
43 | | - mocked_director_v2_api: None, |
| 44 | + mocked_director_v2_api: dict[str, MagicMock], |
44 | 45 | storage_subsystem_mock: MockedStorageSubsystem, |
45 | 46 | # |
46 | 47 | client: TestClient, |
@@ -114,7 +115,7 @@ async def _wait_until_deleted(): |
114 | 115 | @pytest.mark.parametrize(*standard_user_role_response()) |
115 | 116 | async def test_new_project_with_parent_project_node( |
116 | 117 | # for deletion |
117 | | - mocked_director_v2_api: None, |
| 118 | + mocked_director_v2_api: dict[str, MagicMock], |
118 | 119 | storage_subsystem_mock: MockedStorageSubsystem, |
119 | 120 | # |
120 | 121 | client: TestClient, |
@@ -191,7 +192,7 @@ async def test_new_project_with_parent_project_node( |
191 | 192 | @pytest.mark.parametrize(*standard_user_role_response()) |
192 | 193 | async def test_new_project_with_invalid_parent_project_node( |
193 | 194 | # for deletion |
194 | | - mocked_director_v2_api: None, |
| 195 | + mocked_director_v2_api: dict[str, MagicMock], |
195 | 196 | storage_subsystem_mock: MockedStorageSubsystem, |
196 | 197 | # |
197 | 198 | client: TestClient, |
@@ -274,7 +275,7 @@ async def test_new_project_with_invalid_parent_project_node( |
274 | 275 | @pytest.mark.parametrize(*standard_user_role_response()) |
275 | 276 | async def test_set_project_parent_backward_compatibility( |
276 | 277 | # for deletion |
277 | | - mocked_director_v2_api: None, |
| 278 | + mocked_director_v2_api: dict[str, MagicMock], |
278 | 279 | storage_subsystem_mock: MockedStorageSubsystem, |
279 | 280 | # |
280 | 281 | client: TestClient, |
@@ -338,7 +339,7 @@ async def test_set_project_parent_backward_compatibility( |
338 | 339 | @pytest.mark.parametrize(*standard_user_role_response()) |
339 | 340 | async def test_update_project_metadata_backward_compatibility_with_same_project_does_not_raises_and_does_not_work( |
340 | 341 | # for deletion |
341 | | - mocked_director_v2_api: None, |
| 342 | + mocked_director_v2_api: dict[str, MagicMock], |
342 | 343 | storage_subsystem_mock: MockedStorageSubsystem, |
343 | 344 | # |
344 | 345 | client: TestClient, |
@@ -393,7 +394,7 @@ async def test_update_project_metadata_backward_compatibility_with_same_project_ |
393 | 394 | @pytest.mark.parametrize(*standard_user_role_response()) |
394 | 395 | async def test_update_project_metadata_s4lacad_backward_compatibility_passing_nil_parent_node_id( |
395 | 396 | # for deletion |
396 | | - mocked_director_v2_api: None, |
| 397 | + mocked_director_v2_api: dict[str, MagicMock], |
397 | 398 | storage_subsystem_mock: MockedStorageSubsystem, |
398 | 399 | # |
399 | 400 | client: TestClient, |
|
0 commit comments