"""Conftest.""" from typing import Any import pytest from owsclient.m2m.impersonation import ClientCredentials, OAuthToken @pytest.fixture def anyio_backend() -> str: """Support anyio.""" return "asyncio" @pytest.fixture() def valid_client_credentials_data() -> dict[str, Any]: """Return valid client credentials data.""" return { "audience": "https://api.example.com", "client_id": "test_client_id_123", "client_secret": "test_client_secret_456", "grant_type": "client_credentials", } @pytest.fixture() def valid_client_credentials( valid_client_credentials_data: dict[str, Any], ) -> ClientCredentials: """Return valid ClientCredentials.""" return ClientCredentials(**valid_client_credentials_data) @pytest.fixture() def valid_oauth_token_data() -> dict[str, Any]: """Return valid OAuth token data.""" return { "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...", "expires_in": 3600, "token_type": "Bearer", } @pytest.fixture() def valid_oauth_token(valid_oauth_token_data: dict[str, Any]) -> OAuthToken: """Return valid OAuthToken.""" return OAuthToken(**valid_oauth_token_data) @pytest.fixture() def impersonated_identity_uuid() -> str: """Return an impersonated identity uuid.""" return "195be134-b4d6-405f-9173-2a71935ad231" @pytest.fixture() def auth0_url() -> str: """Return a mock auth0_url.""" return "https://test-auth0.example.com"