|
1 | 1 | """Tests for agent factory and configuration-based agent creation. |
2 | 2 |
|
3 | | -This module contains tests for AgentFactory and dynamic agent instantiation. |
| 3 | +This module contains tests for AgentFactory and dynamic agent |
| 4 | +instantiation. |
4 | 5 | """ |
5 | 6 |
|
6 | 7 | from unittest.mock import Mock, patch |
@@ -275,6 +276,7 @@ async def test_empty_task_creation(self): |
275 | 276 | @pytest.mark.asyncio |
276 | 277 | async def test_agent_creation_with_toolkit(self): |
277 | 278 | """Test creating agent with custom toolkit.""" |
| 279 | + |
278 | 280 | class CustomTool(BaseTool): |
279 | 281 | tool_name = "custom_tool" |
280 | 282 | description = "A custom test tool" |
@@ -402,6 +404,7 @@ async def test_create_agent_with_string_tool(self): |
402 | 404 | @pytest.mark.asyncio |
403 | 405 | async def test_create_agent_with_mixed_tools(self): |
404 | 406 | """Test creating agent with both class and string tool names.""" |
| 407 | + |
405 | 408 | class CustomTool(BaseTool): |
406 | 409 | tool_name = "custom_tool" |
407 | 410 | description = "A custom test tool" |
@@ -511,6 +514,7 @@ class TestAgentFactoryMCPIntegration: |
511 | 514 | @pytest.mark.asyncio |
512 | 515 | async def test_create_agent_with_mcp_tools(self): |
513 | 516 | """Test creating agent with MCP tools.""" |
| 517 | + |
514 | 518 | class MockMCPTool(BaseTool): |
515 | 519 | tool_name = "mcp_tool" |
516 | 520 | description = "Mock MCP tool" |
@@ -545,6 +549,7 @@ class MockMCPTool(BaseTool): |
545 | 549 | @pytest.mark.asyncio |
546 | 550 | async def test_create_agent_with_mcp_and_regular_tools(self): |
547 | 551 | """Test creating agent with both MCP and regular tools.""" |
| 552 | + |
548 | 553 | class MockMCPTool1(BaseTool): |
549 | 554 | tool_name = "mcp_tool_1" |
550 | 555 | description = "Mock MCP tool 1" |
@@ -613,4 +618,3 @@ def test_get_definitions_list_empty(self): |
613 | 618 |
|
614 | 619 | assert len(definitions) == 0 |
615 | 620 | assert definitions == [] |
616 | | - |
|
0 commit comments