@@ -250,22 +250,31 @@ async def test_run_tool_with_optional_param_omitted(self, toolbox: ToolboxClient
250
250
"""Invoke a tool providing only the required parameter."""
251
251
tool = await toolbox .load_tool ("search-rows" )
252
252
253
- response = await tool (query = "test query " )
253
+ response = await tool (
email = "[email protected] ")
254
254
assert isinstance (response , str )
255
255
assert 'query="test query"' in response
256
256
assert "limit" not in response
257
257
258
- async def test_run_tool_with_optional_param_provided (self , toolbox : ToolboxClient ):
258
+ async def test_run_tool_with_optional_data_provided (self , toolbox : ToolboxClient ):
259
259
"""Invoke a tool providing both required and optional parameters."""
260
260
tool = await toolbox .load_tool ("search-rows" )
261
261
262
- response = await tool (query = "test query" , limit = 10 )
262
+ response = await tool (
email = "[email protected] " ,
data = "row2" )
263
+ assert isinstance (response , str )
264
+ assert 'query="test query"' in response
265
+ assert "limit=10" in response
266
+
267
+ async def test_run_tool_with_optional_id_provided (self , toolbox : ToolboxClient ):
268
+ """Invoke a tool providing both required and optional parameters."""
269
+ tool = await toolbox .load_tool ("search-rows" )
270
+
271
+ response = await tool (
email = "[email protected] " ,
id = 1 )
263
272
assert isinstance (response , str )
264
273
assert 'query="test query"' in response
265
274
assert "limit=10" in response
266
275
267
276
async def test_run_tool_with_missing_required_param (self , toolbox : ToolboxClient ):
268
277
"""Invoke a tool without its required parameter."""
269
278
tool = await toolbox .load_tool ("search-rows" )
270
- with pytest .raises (TypeError , match = "missing a required argument: 'query '" ):
271
- await tool (limit = 5 )
279
+ with pytest .raises (TypeError , match = "missing a required argument: 'email '" ):
280
+ await tool (id = 2 , data = "row2" )
0 commit comments