From 6063677c01eedafc7a0a513e2bf91ce5e1d3ec9d Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 10 Nov 2025 15:17:30 +0000 Subject: [PATCH] fix: Correct MCPToolWrapper patch path in fragment filtering test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- lib/crewai/tests/mcp/test_http_mcp_support.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/crewai/tests/mcp/test_http_mcp_support.py b/lib/crewai/tests/mcp/test_http_mcp_support.py index fd8458ee9..81b61b9fb 100644 --- a/lib/crewai/tests/mcp/test_http_mcp_support.py +++ b/lib/crewai/tests/mcp/test_http_mcp_support.py @@ -148,7 +148,7 @@ class TestHTTPMCPFragmentFiltering: } 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() result = agent._get_external_mcp_tools("http://localhost:7365/mcp#specific_tool")