Skip to content

Commit 5478548

Browse files
committed
cleanup
1 parent 19397c1 commit 5478548

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

services/catalog/tests/unit/conftest.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,9 @@ async def _side_effect(app: FastAPI):
239239
return _side_effect
240240

241241
for name in ("start_registry_sync_task", "stop_registry_sync_task"):
242-
mocker.patch(
243-
f"simcore_service_catalog.core.events.{name}",
242+
mocker.patch.object(
243+
simcore_service_catalog.core.events,
244+
name,
244245
side_effect=_factory(name),
245246
autospec=True,
246247
)
@@ -254,8 +255,10 @@ async def _side_effect(app: FastAPI):
254255
@pytest.fixture
255256
def rabbitmq_and_rpc_setup_disabled(mocker: MockerFixture):
256257
# The following services are affected if rabbitmq is not in place
257-
mocker.patch("simcore_service_catalog.core.application.setup_rabbitmq")
258-
mocker.patch("simcore_service_catalog.core.application.setup_rpc_api_routes")
258+
mocker.patch.object(simcore_service_catalog.core.application, "setup_rabbitmq")
259+
mocker.patch.object(
260+
simcore_service_catalog.core.application, "setup_rpc_api_routes"
261+
)
259262

260263

261264
@pytest.fixture

services/catalog/tests/unit/test_services_director.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import pytest
1313
from fastapi import FastAPI
1414
from models_library.services_metadata_published import ServiceMetaDataPublished
15+
from pytest_mock import MockType
1516
from pytest_simcore.helpers.monkeypatch_envs import setenvs_from_dict
1617
from pytest_simcore.helpers.typing_env import EnvVarsDict
1718
from respx.router import MockRouter
@@ -34,6 +35,7 @@ def app_environment(
3435

3536

3637
async def test_director_client_high_level_api(
38+
postgres_setup_disabled: MockType,
3739
background_tasks_setup_disabled: None,
3840
rabbitmq_and_rpc_setup_disabled: None,
3941
expected_director_list_services: list[dict[str, Any]],

0 commit comments

Comments
 (0)