Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.
test: avoid URL substring assertion in brave search test (#4453)
Rip&Tear87675b49fd8f
diff --git a/lib/crewai-tools/tests/tools/brave_search_tool_test.py b/lib/crewai-tools/tests/tools/brave_search_tool_test.pyindex 361086abe..6e1300622 100644--- a/lib/crewai-tools/tests/tools/brave_search_tool_test.py+++ b/lib/crewai-tools/tests/tools/brave_search_tool_test.py@@ -33,8 +33,11 @@ def test_brave_tool_search(mock_get, brave_tool):mock_get.return_value.json.return_value = mock_responseresult = brave_tool.run(query="test")- assert "Test Title" in result- assert "http://test.com" in result+ data = json.loads(result)+ assert isinstance(data, list)+ assert len(data) >= 1+ assert data[0]["title"] == "Test Title"+ assert data[0]["url"] == "http://test.com"@patch("requests.get")