@@ -49,7 +49,7 @@ def test_tool_pool_with_initial_tools(self):
49
49
tool2 = MockAgentTool ("tool2" , "javascript" )
50
50
51
51
pool = ToolPool ([tool1 , tool2 ])
52
- assert set (pool .list_tools ()) == {"tool1" , "tool2" }
52
+ assert set (pool .list_tool_names ()) == {"tool1" , "tool2" }
53
53
54
54
def test_tool_pool_with_tool_functions (self ):
55
55
"""Test ToolPool creation with @tool decorated functions."""
@@ -67,7 +67,7 @@ def tool2():
67
67
tool2 ._strands_tool_spec = {"name" : "tool2" , "description" : "Tool 2" , "inputSchema" : {}}
68
68
69
69
pool = ToolPool ([tool1 , tool2 ])
70
- assert set (pool .list_tools ()) == {"tool1" , "tool2" }
70
+ assert set (pool .list_tool_names ()) == {"tool1" , "tool2" }
71
71
72
72
def test_tool_pool_with_mixed_tools (self ):
73
73
"""Test ToolPool creation with mixed AgentTool instances and functions."""
@@ -82,7 +82,7 @@ def func_tool():
82
82
func_tool ._strands_tool_spec = {"name" : "func_tool" , "description" : "Function tool" , "inputSchema" : {}}
83
83
84
84
pool = ToolPool ([agent_tool , func_tool ])
85
- assert set (pool .list_tools ()) == {"agent_tool" , "func_tool" }
85
+ assert set (pool .list_tool_names ()) == {"agent_tool" , "func_tool" }
86
86
87
87
def test_add_and_get_tool (self ):
88
88
"""Test adding and retrieving AgentTool instances."""
@@ -92,7 +92,7 @@ def test_add_and_get_tool(self):
92
92
tool = MockAgentTool ("test_tool" , "python" )
93
93
94
94
pool .add_tool (tool )
95
- assert "test_tool" in pool .list_tools ()
95
+ assert "test_tool" in pool .list_tool_names ()
96
96
assert pool .get_tool ("test_tool" ) == tool
97
97
assert pool .get_tool ("nonexistent" ) is None
98
98
@@ -130,7 +130,7 @@ def mock_tool():
130
130
pool = ToolPool ()
131
131
pool .add_tools_from_module (MockModule )
132
132
133
- assert "mock_tool" in pool .list_tools ()
133
+ assert "mock_tool" in pool .list_tool_names ()
134
134
135
135
def test_from_module_class_method (self ):
136
136
"""Test creating ToolPool from module."""
@@ -157,5 +157,5 @@ def not_a_tool():
157
157
158
158
pool = ToolPool .from_module (MockModule )
159
159
160
- assert set (pool .list_tools ()) == {"tool1" , "tool2" }
161
- assert "not_a_tool" not in pool .list_tools ()
160
+ assert set (pool .list_tool_names ()) == {"tool1" , "tool2" }
161
+ assert "not_a_tool" not in pool .list_tool_names ()
0 commit comments