Skip to content

armgit / mem0

Public Imported from GitHub
0

The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.

Fix Azure OpenAI test (#2217)

Dev Khantf16a580ef63e
diff --git a/tests/llms/test_azure_openai.py b/tests/llms/test_azure_openai.py
index 42b3ba37c..079ef349f 100644
--- a/tests/llms/test_azure_openai.py
+++ b/tests/llms/test_azure_openai.py
@@ -97,8 +97,8 @@ def test_generate_response_with_tools(mock_openai_client):
[None, {"Firstkey": "FirstVal", "SecondKey": "SecondVal"}],
)
def test_generate_with_http_proxies(default_headers):
- mock_http_client = Mock(spec=httpx.Client)
- mock_http_client_instance = Mock(spec=httpx.Client)
+ mock_http_client = Mock()
+ mock_http_client_instance = Mock()
mock_http_client.return_value = mock_http_client_instance
azure_kwargs = {"api_key": "test"}
if default_headers:
@@ -106,7 +106,7 @@ def test_generate_with_http_proxies(default_headers):
with (
patch("mem0.llms.azure_openai.AzureOpenAI") as mock_azure_openai,
- patch("httpx.Client", new=mock_http_client) as mock_http_client,
+ patch("httpx.Client", new=mock_http_client),
):
config = BaseLlmConfig(
model=MODEL,