Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,44 +39,58 @@


@pytest.fixture(name="vws_client")
def fixture_vws_client(*, vuforia_database: CloudDatabase) -> VWS:
def fixture_vws_client(
*,
vuforia_database: CloudDatabase,
base_vws_url: str,
) -> VWS:
"""A VWS client for an active VWS database."""
return VWS(
server_access_key=vuforia_database.server_access_key,
server_secret_key=vuforia_database.server_secret_key,
base_vws_url=base_vws_url,
)


@pytest.fixture
def cloud_reco_client(*, vuforia_database: CloudDatabase) -> CloudRecoService:
def cloud_reco_client(
*,
vuforia_database: CloudDatabase,
base_vwq_url: str,
) -> CloudRecoService:
"""A query client for an active VWS database."""
return CloudRecoService(
client_access_key=vuforia_database.client_access_key,
client_secret_key=vuforia_database.client_secret_key,
base_vwq_url=base_vwq_url,
)


@pytest.fixture(name="inactive_vws_client")
def fixture_inactive_vws_client(
*,
inactive_cloud_database: CloudDatabase,
base_vws_url: str,
) -> VWS:
"""A client for an inactive VWS database."""
return VWS(
server_access_key=inactive_cloud_database.server_access_key,
server_secret_key=inactive_cloud_database.server_secret_key,
base_vws_url=base_vws_url,
)


@pytest.fixture
def inactive_cloud_reco_client(
*,
inactive_cloud_database: CloudDatabase,
base_vwq_url: str,
) -> CloudRecoService:
"""A query client for an inactive VWS database."""
return CloudRecoService(
client_access_key=inactive_cloud_database.client_access_key,
client_secret_key=inactive_cloud_database.client_secret_key,
base_vwq_url=base_vwq_url,
)


Expand Down
13 changes: 13 additions & 0 deletions tests/mock_vws/fixtures/vuforia_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,19 @@
LOGGER = logging.getLogger(name=__name__)
LOGGER.setLevel(level=logging.DEBUG)


@pytest.fixture
def base_vws_url() -> str:
"""The Vuforia Web Services API URL for the backend."""
return "https://vws.vuforia.com"


@pytest.fixture
def base_vwq_url() -> str:
"""The Vuforia Web Query API URL for the backend."""
return "https://cloudreco.vuforia.com"


# The in-memory mock which the ``MOCK`` backend is running, if any.
#
# Tests which use APIs of the mock itself, such as seeding recognition counts,
Expand Down
Loading