Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!
Python
fix: Test run with call mock
Clémence Lesnéb8ad9076f717
diff --git a/tests/conftest.py b/tests/conftest.pyindex 3495857..64fa24d 100644--- a/tests/conftest.py+++ b/tests/conftest.py@@ -14,16 +14,31 @@ import randomimport stringimport xml.etree.ElementTree as ETfrom azure.communication.callautomation import (+ CallAutomationClient,+ CallConnectionClient,FileSource,SsmlSource,TextSource,- CallConnectionClient,)_logger = build_logger(__name__)+class CallAutomationClientMock(CallAutomationClient):+ _play_media_callback: Callable[[str], None]++ def __init__(self, play_media_callback: Callable[[str], None]) -> None:+ self._play_media_callback = play_media_callback++ def get_call_connection(+ self,+ *args,+ **kwargs,+ ) -> CallConnectionClient:+ return CallConnectionClientMock(self._play_media_callback)++class CallConnectionClientMock(CallConnectionClient):_play_media_callback: Callable[[str], None]@@ -41,7 +56,6 @@ class CallConnectionClientMock(CallConnectionClient):self,play_source: Union[FileSource, TextSource, SsmlSource],*args,- operation_context: Optional[str] = None,**kwargs,) -> None:if isinstance(play_source, TextSource):