Skip to content

Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!

Python

fix: Use managed identities for tests also

Clémence Lesné75583b2989bb
diff --git a/tests/conftest.py b/tests/conftest.py
index 9b2ed56..7e5cd7a 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -15,7 +15,7 @@ from azure.communication.callautomation.aio import (
CallAutomationClient,
CallConnectionClient,
)
-from azure.identity import ManagedIdentityCredential, get_bearer_token_provider
+from azure.identity import DefaultAzureCredential, get_bearer_token_provider
from deepeval.models.gpt_model import GPTModel
from langchain_openai import AzureChatOpenAI
from pydantic import BaseModel, ValidationError
@@ -149,7 +149,7 @@ class DeepEvalAzureOpenAI(GPTModel):
"model": platform.model,
# Authentication, either RBAC or API
"azure_ad_token_provider": get_bearer_token_provider(
- ManagedIdentityCredential(),
+ DefaultAzureCredential(),
"https://cognitiveservices.azure.com/.default",
),
# DeepEval