"""Conftest. This file gets picked up when running py.test tests: http://pytest.org/latest/writing_plugins.html#conftest """ from collections.abc import Iterator import pytest from owsclient import OwsClient from backfill.connectors.ows_pdp.ows_pdp import OwsPdpClient @pytest.fixture def mock_ows_client() -> Iterator[OwsClient]: """Return an OwsClient.""" ows_client = OwsClient(environment="test", service_name="ows-test") yield ows_client @pytest.fixture() def ows_pdp_client(mock_ows_client: OwsClient) -> OwsPdpClient: """Reusable ows-pdp client.""" return OwsPdpClient(ows_client=mock_ows_client)