mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-10 00:28:31 +00:00
fix: Correct MCPToolWrapper patch path in fragment filtering test
The test was patching 'crewai.agent.core.MCPToolWrapper' but the import happens inside _get_external_mcp_tools as 'from crewai.tools.mcp_tool_wrapper import MCPToolWrapper'. Updated to patch the correct import path to ensure the test works when it actually runs. Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
@@ -148,7 +148,7 @@ class TestHTTPMCPFragmentFiltering:
|
|||||||
}
|
}
|
||||||
|
|
||||||
with patch.object(agent, '_get_mcp_tool_schemas', return_value=mock_schemas):
|
with patch.object(agent, '_get_mcp_tool_schemas', return_value=mock_schemas):
|
||||||
with patch('crewai.agent.core.MCPToolWrapper') as mock_wrapper_class:
|
with patch('crewai.tools.mcp_tool_wrapper.MCPToolWrapper') as mock_wrapper_class:
|
||||||
mock_wrapper_class.return_value = MagicMock()
|
mock_wrapper_class.return_value = MagicMock()
|
||||||
|
|
||||||
result = agent._get_external_mcp_tools("http://localhost:7365/mcp#specific_tool")
|
result = agent._get_external_mcp_tools("http://localhost:7365/mcp#specific_tool")
|
||||||
|
|||||||
Reference in New Issue
Block a user