Skip to content

Commit 07ffb27

Browse files
committed
chore: Update e2e tests
1 parent 661bb5b commit 07ffb27

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

packages/toolbox-core/tests/test_e2e.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,22 +250,31 @@ async def test_run_tool_with_optional_param_omitted(self, toolbox: ToolboxClient
250250
"""Invoke a tool providing only the required parameter."""
251251
tool = await toolbox.load_tool("search-rows")
252252

253-
response = await tool(query="test query")
253+
response = await tool(email="[email protected]")
254254
assert isinstance(response, str)
255255
assert 'query="test query"' in response
256256
assert "limit" not in response
257257

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):
259259
"""Invoke a tool providing both required and optional parameters."""
260260
tool = await toolbox.load_tool("search-rows")
261261

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)
263272
assert isinstance(response, str)
264273
assert 'query="test query"' in response
265274
assert "limit=10" in response
266275

267276
async def test_run_tool_with_missing_required_param(self, toolbox: ToolboxClient):
268277
"""Invoke a tool without its required parameter."""
269278
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

Comments
 (0)