Skip to content

Commit 9c3ba38

Browse files
committed
add bind param test case
1 parent 12af5fa commit 9c3ba38

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

packages/toolbox-core/tests/test_e2e.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,18 @@ async def test_run_tool_wrong_param_type(self, get_n_rows_tool: ToolboxTool):
9797
):
9898
await get_n_rows_tool(num_rows=2)
9999

100+
##### Bind param tests
101+
async def test_bind_params(self, toolbox, get_n_rows_tool):
102+
new_tool = get_n_rows_tool.bind_parameters({"num_rows": "3"})
103+
response = await new_tool()
104+
105+
assert isinstance(response, str)
106+
assert "row1" in response
107+
assert "row2" in response
108+
assert "row3" in response
109+
assert "row4" not in response
110+
100111
##### Auth tests
101-
@pytest.mark.asyncio
102112
async def test_run_tool_unauth_with_auth(self, toolbox, auth_token2):
103113
"""Tests running a tool that doesn't require auth, with auth provided."""
104114
tool = await toolbox.load_tool(

0 commit comments

Comments
 (0)