Skip to content

Commit 330dde4

Browse files
committed
fix: Fix e2e tests
1 parent 9d52fc3 commit 330dde4

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

packages/toolbox-core/tests/test_e2e.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -224,15 +224,15 @@ async def test_run_tool_param_auth_no_field(
224224

225225

226226
@pytest.mark.asyncio
227-
@pytest.mark.usefixtures("optional_param_server")
227+
@pytest.mark.usefixtures("toolbox_server")
228228
class TestOptionalParams:
229229
"""
230230
End-to-end tests for tools with optional parameters.
231231
"""
232232

233-
async def test_tool_signature_is_correct(self, optional_toolbox: ToolboxClient):
233+
async def test_tool_signature_is_correct(self, toolbox: ToolboxClient):
234234
"""Verify the client correctly constructs the signature for a tool with optional params."""
235-
tool = await optional_toolbox.load_tool("search-rows")
235+
tool = await toolbox.load_tool("search-rows")
236236
sig = signature(tool)
237237

238238
assert "query" in sig.parameters
@@ -247,31 +247,31 @@ async def test_tool_signature_is_correct(self, optional_toolbox: ToolboxClient):
247247
assert sig.parameters["limit"].annotation is Optional[int]
248248

249249
async def test_run_tool_with_optional_param_omitted(
250-
self, optional_toolbox: ToolboxClient
250+
self, toolbox: ToolboxClient
251251
):
252252
"""Invoke a tool providing only the required parameter."""
253-
tool = await optional_toolbox.load_tool("search-rows")
253+
tool = await toolbox.load_tool("search-rows")
254254

255255
response = await tool(query="test query")
256256
assert isinstance(response, str)
257257
assert 'query="test query"' in response
258258
assert "limit" not in response
259259

260260
async def test_run_tool_with_optional_param_provided(
261-
self, optional_toolbox: ToolboxClient
261+
self, toolbox: ToolboxClient
262262
):
263263
"""Invoke a tool providing both required and optional parameters."""
264-
tool = await optional_toolbox.load_tool("search-rows")
264+
tool = await toolbox.load_tool("search-rows")
265265

266266
response = await tool(query="test query", limit=10)
267267
assert isinstance(response, str)
268268
assert 'query="test query"' in response
269269
assert "limit=10" in response
270270

271271
async def test_run_tool_with_missing_required_param(
272-
self, optional_toolbox: ToolboxClient
272+
self, toolbox: ToolboxClient
273273
):
274274
"""Invoke a tool without its required parameter."""
275-
tool = await optional_toolbox.load_tool("search-rows")
275+
tool = await toolbox.load_tool("search-rows")
276276
with pytest.raises(TypeError, match="missing a required argument: 'query'"):
277277
await tool(limit=5)

0 commit comments

Comments
 (0)