From 750f9a1e14fb4762fb7c7cb07768d19d44191ecb Mon Sep 17 00:00:00 2001 From: Sambhav Dixit <94298612+sambhavnoobcoder@users.noreply.github.com> Date: Tue, 29 Oct 2024 01:22:57 +0530 Subject: [PATCH] Updated test , especially for tool gen mocking --- tests/agents/test_agent_logging.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/agents/test_agent_logging.py b/tests/agents/test_agent_logging.py index 884216e5..b2106dd6 100644 --- a/tests/agents/test_agent_logging.py +++ b/tests/agents/test_agent_logging.py @@ -5,6 +5,15 @@ from datetime import datetime import unittest from swarms.schemas.agent_step_schemas import ManySteps, Step from swarms.structs.agent import Agent +from swarms.tools.tool_parse_exec import parse_and_execute_json + +# Mock parse_and_execute_json for testing +parse_and_execute_json = MagicMock() +parse_and_execute_json.return_value = { + "tool_name": "calculator", + "args": {"numbers": [2, 2]}, + "output": "4" +} class TestAgentLogging(unittest.TestCase): def setUp(self):