MCPcopy Create free account
hub / github.com/Azure-Samples/rag-postgres-openai-python / mock_azure_credential

Function mock_azure_credential

tests/conftest.py:346–350  ·  view source on GitHub ↗

Mock the Azure credential for testing.

(mock_session_env)

Source from the content-addressed store, hash-verified

344
345@pytest.fixture(scope="function")
346def mock_azure_credential(mock_session_env):
347 """Mock the Azure credential for testing."""
348 with mock.patch("azure.identity.aio.AzureDeveloperCliCredential") as mock_azure_credential:
349 mock_azure_credential.return_value = MockAzureCredential()
350 yield mock_azure_credential
351
352
353@pytest_asyncio.fixture(scope="function")

Callers

nothing calls this directly

Calls 1

MockAzureCredentialClass · 0.90

Tested by

no test coverage detected