File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
services/notifications/tests Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 33
44
55import datetime
6- from collections .abc import AsyncIterator
6+ from collections .abc import AsyncIterator , Awaitable , Callable
77from functools import partial
88from pathlib import Path
99from typing import Any
2020from models_library .basic_types import BootModeEnum
2121from pytest_simcore .helpers .monkeypatch_envs import EnvVarsDict , setenvs_from_dict
2222from servicelib .fastapi .celery .app_server import FastAPIAppServer
23+ from servicelib .rabbitmq import RabbitMQRPCClient
2324from simcore_service_notifications .core .application import create_app
2425from simcore_service_notifications .core .settings import ApplicationSettings
2526from simcore_service_notifications .modules .celery .tasks import (
@@ -112,3 +113,12 @@ def _on_worker_init_wrapper(sender: WorkController, **_kwargs):
112113 queues = "," .join (queue .value for queue in TaskQueue ),
113114 ) as worker :
114115 yield worker
116+
117+
118+ @pytest .fixture
119+ async def notifications_rabbitmq_rpc_client (
120+ rabbitmq_rpc_client : Callable [[str ], Awaitable [RabbitMQRPCClient ]],
121+ ) -> RabbitMQRPCClient :
122+ rpc_client = await rabbitmq_rpc_client ("pytest_notifications_rpc_client" )
123+ assert rpc_client
124+ return rpc_client
You can’t perform that action at this time.
0 commit comments