Skip to content

Commit fef8b40

Browse files
committed
chore: Fix integration tests
1 parent 757657d commit fef8b40

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

packages/toolbox-core/tests/test_e2e.py

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ async def test_run_tool_with_optional_params_omitted(self, toolbox: ToolboxClien
258258

259259
response = await tool(email="[email protected]")
260260
assert isinstance(response, str)
261-
assert 'email="[email protected]"' in response
261+
assert '"email":"[email protected]"' in response
262262
assert "row1" not in response
263263
assert "row2" in response
264264
assert "row3" not in response
@@ -272,7 +272,7 @@ async def test_run_tool_with_optional_data_provided(self, toolbox: ToolboxClient
272272

273273
response = await tool(email="[email protected]", data="row3")
274274
assert isinstance(response, str)
275-
assert 'email="[email protected]"' in response
275+
assert '"email":"[email protected]"' in response
276276
assert "row1" not in response
277277
assert "row2" not in response
278278
assert "row3" in response
@@ -286,7 +286,7 @@ async def test_run_tool_with_optional_data_null(self, toolbox: ToolboxClient):
286286

287287
response = await tool(email="[email protected]", data=None)
288288
assert isinstance(response, str)
289-
assert 'email="[email protected]"' in response
289+
assert '"email":"[email protected]"' in response
290290
assert "row1" not in response
291291
assert "row2" in response
292292
assert "row3" not in response
@@ -300,21 +300,15 @@ async def test_run_tool_with_optional_id_provided(self, toolbox: ToolboxClient):
300300

301301
response = await tool(email="[email protected]", id=1)
302302
assert isinstance(response, str)
303-
assert 'email="[email protected]"' in response
304-
assert "row1" in response
305-
assert "row2" not in response
306-
assert "row3" not in response
307-
assert "row4" not in response
308-
assert "row5" not in response
309-
assert "row6" not in response
303+
assert response == "null"
310304

311305
async def test_run_tool_with_optional_id_null(self, toolbox: ToolboxClient):
312306
"""Invoke a tool providing both required and optional parameters."""
313307
tool = await toolbox.load_tool("search-rows")
314308

315309
response = await tool(email="[email protected]", id=None)
316310
assert isinstance(response, str)
317-
assert 'email="[email protected]"' in response
311+
assert '"email":"[email protected]"' in response
318312
assert "row1" not in response
319313
assert "row2" in response
320314
assert "row3" not in response
@@ -331,7 +325,7 @@ async def test_run_tool_with_missing_required_param(self, toolbox: ToolboxClient
331325
async def test_run_tool_with_required_param_null(self, toolbox: ToolboxClient):
332326
"""Invoke a tool without its required parameter."""
333327
tool = await toolbox.load_tool("search-rows")
334-
with pytest.raises(TypeError, match="missing a required argument: 'email'"):
328+
with pytest.raises(ValidationError, match="missing a required argument: 'email'"):
335329
await tool(email=None, id=5, data="row5")
336330

337331
async def test_run_tool_with_all_default_params(self, toolbox: ToolboxClient):
@@ -340,7 +334,7 @@ async def test_run_tool_with_all_default_params(self, toolbox: ToolboxClient):
340334

341335
response = await tool(email="[email protected]", id=0, data="row2")
342336
assert isinstance(response, str)
343-
assert 'email="[email protected]"' in response
337+
assert '"email":"[email protected]"' in response
344338
assert "row1" not in response
345339
assert "row2" in response
346340
assert "row3" not in response
@@ -354,7 +348,7 @@ async def test_run_tool_with_all_valid_params(self, toolbox: ToolboxClient):
354348

355349
response = await tool(email="[email protected]", id=3, data="row3")
356350
assert isinstance(response, str)
357-
assert 'email="[email protected]"' in response
351+
assert '"email":"[email protected]"' in response
358352
assert "row1" not in response
359353
assert "row2" not in response
360354
assert "row3" in response

0 commit comments

Comments
 (0)