Skip to content

armgit / camel

Public Imported from GitHub
0

🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org

fix: unstable tool_calling_math_async test (#2427)

Boer-Zhangaf07d381ee37
diff --git a/test/agents/test_chat_agent.py b/test/agents/test_chat_agent.py
index 1e33bd95f..85e515524 100644
--- a/test/agents/test_chat_agent.py
+++ b/test/agents/test_chat_agent.py
@@ -16,7 +16,7 @@ import json
from copy import deepcopy
from io import BytesIO
from typing import List
-from unittest.mock import MagicMock
+from unittest.mock import AsyncMock, MagicMock
import pytest
from openai.types.chat.chat_completion import Choice
@@ -1076,7 +1076,7 @@ async def test_tool_calling_math_async(step_call_count=3):
),
)
- model.run = MagicMock(
+ model.arun = AsyncMock(
side_effect=[
model_backend_rsp_tool,
model_backend_rsp_tool1,