Fix test: Use valid MCP reference in test_agent_kickoff_async_includes_platform_and_mcp_tools

- Change mcps parameter from ['test_mcp'] to ['crewai-amp:dummy'] to pass validation
- Add assertions to verify get_platform_tools and get_mcp_tools are called
- MCP references must start with 'https://' or 'crewai-amp:' per validation rules

Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
Devin AI
2025-11-18 11:31:38 +00:00
parent 5715827ff7
commit e45f7c68f9

View File

@@ -279,7 +279,7 @@ def test_agent_kickoff_async_includes_platform_and_mcp_tools(mock_lite_agent):
goal="test goal", goal="test goal",
backstory="test backstory", backstory="test backstory",
apps=["test_app"], apps=["test_app"],
mcps=["test_mcp"], mcps=["crewai-amp:dummy"],
multimodal=True, multimodal=True,
) )
@@ -291,6 +291,9 @@ def test_agent_kickoff_async_includes_platform_and_mcp_tools(mock_lite_agent):
call_kwargs = mock_lite_agent.call_args[1] call_kwargs = mock_lite_agent.call_args[1]
tools = call_kwargs["tools"] tools = call_kwargs["tools"]
mock_platform_tools.assert_called_once()
mock_mcp_tools.assert_called_once()
assert any(isinstance(tool, PlatformTool) for tool in tools) assert any(isinstance(tool, PlatformTool) for tool in tools)
assert any(isinstance(tool, MCPTool) for tool in tools) assert any(isinstance(tool, MCPTool) for tool in tools)
assert any(isinstance(tool, AddImageTool) for tool in tools) assert any(isinstance(tool, AddImageTool) for tool in tools)