mirror of
https://github.com/crewAIInc/crewAI.git
synced 2025-12-15 20:08:29 +00:00
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:
@@ -279,7 +279,7 @@ def test_agent_kickoff_async_includes_platform_and_mcp_tools(mock_lite_agent):
|
||||
goal="test goal",
|
||||
backstory="test backstory",
|
||||
apps=["test_app"],
|
||||
mcps=["test_mcp"],
|
||||
mcps=["crewai-amp:dummy"],
|
||||
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]
|
||||
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, MCPTool) for tool in tools)
|
||||
assert any(isinstance(tool, AddImageTool) for tool in tools)
|
||||
|
||||
Reference in New Issue
Block a user