from collections.abc import Iterator from unittest import mock import pytest from cachelib import BaseCache as Cache, SimpleCache from owsclient import OwsClient from fansifter_common.adapters.graphql_router import GraphqlRouterClient from fansifter_common.adapters.ows_account import OwsAccountClient from fansifter_common.adapters.ows_pdp import OwsPdpClient from fansifter_common.adapters.stripo import StripoClient @pytest.fixture def anyio_backend() -> str: return "asyncio" @pytest.fixture def ows_client() -> Iterator[OwsClient]: yield OwsClient(environment="test", service_name="fansfiter") @pytest.fixture def ows_pdp_client_mock() -> mock.MagicMock: return mock.MagicMock(spec=OwsPdpClient) @pytest.fixture def ows_account_client_mock() -> mock.MagicMock: return mock.MagicMock(spec=OwsAccountClient) @pytest.fixture def stripo_client_mock() -> mock.MagicMock: return mock.MagicMock(spec=StripoClient) @pytest.fixture def graphql_router_client_mock() -> mock.MagicMock: return mock.MagicMock(spec=GraphqlRouterClient) @pytest.fixture def cache() -> Cache: return SimpleCache()