From f6072d267521688fb0340938390b31c913fcf991 Mon Sep 17 00:00:00 2001 From: Greyson LaLonde Date: Sat, 29 Nov 2025 11:21:22 -0500 Subject: [PATCH] chore: use correct mock in tests --- lib/crewai/tests/utilities/test_planning_handler.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/crewai/tests/utilities/test_planning_handler.py b/lib/crewai/tests/utilities/test_planning_handler.py index d52d18b90..dca0c2028 100644 --- a/lib/crewai/tests/utilities/test_planning_handler.py +++ b/lib/crewai/tests/utilities/test_planning_handler.py @@ -101,12 +101,12 @@ class TestInternalCrewPlanner: # Knowledge field should not be present when empty assert '"agent_knowledge"' not in tasks_summary - @patch("crewai.knowledge.storage.knowledge_storage.chromadb") - def test_create_tasks_summary_with_knowledge_and_tools(self, mock_chroma): + @patch("crewai.knowledge.knowledge.Knowledge.add_sources") + @patch("crewai.knowledge.storage.knowledge_storage.KnowledgeStorage") + def test_create_tasks_summary_with_knowledge_and_tools( + self, mock_storage, mock_add_sources + ): """Test task summary generation with both knowledge and tools present.""" - # Mock ChromaDB collection - mock_collection = mock_chroma.return_value.get_or_create_collection.return_value - mock_collection.add.return_value = None # Create mock tools with proper string descriptions and structured tool support class MockTool(BaseTool):