Skip to content

Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.

drop unneccesary tests (#1484)

Brandon Hancock (bhancock_ai)6bcb3d108050
diff --git a/tests/tools/test_tool_usage.py b/tests/tools/test_tool_usage.py
index d0a6ec0b0..8af9b8abb 100644
--- a/tests/tools/test_tool_usage.py
+++ b/tests/tools/test_tool_usage.py
@@ -1,12 +1,12 @@
import json
import random
-from unittest.mock import MagicMock, patch
+from unittest.mock import MagicMock
import pytest
from crewai_tools import BaseTool
from pydantic import BaseModel, Field
-from crewai import Agent, Crew, Task
+from crewai import Agent, Task
from crewai.tools.tool_usage import ToolUsage
@@ -44,36 +44,12 @@ example_task = Task(
)
-def test_random_number_tool_usage():
- crew = Crew(
- agents=[example_agent],
- tasks=[example_task],
- )
-
- with patch.object(random, "randint", return_value=42):
- result = crew.kickoff()
-
- assert "42" in result.raw
-
-
def test_random_number_tool_range():
tool = RandomNumberTool()
result = tool._run(1, 10)
assert 1 <= result <= 10
-def test_random_number_tool_with_crew():
- crew = Crew(
- agents=[example_agent],
- tasks=[example_task],
- )
-
- result = crew.kickoff()
-
- # Check if the result contains a number between 1 and 100
- assert any(str(num) in result.raw for num in range(1, 101))
-
-
def test_random_number_tool_invalid_range():
tool = RandomNumberTool()
with pytest.raises(ValueError):