@@ -90,19 +90,19 @@ async def test_aload_toolset_all(self, toolbox):
90
90
async def test_run_tool_async (self , get_n_rows_tool ):
91
91
response = await get_n_rows_tool .acall (num_rows = "2" )
92
92
93
- assert "row1" in response
94
- assert "row2" in response
95
- assert "row3" not in response
93
+ assert "row1" in response . content
94
+ assert "row2" in response . content
95
+ assert "row3" not in response . content
96
96
97
97
async def test_run_tool_sync (self , get_n_rows_tool ):
98
98
response = get_n_rows_tool .call (num_rows = "2" )
99
99
100
- assert "row1" in response
101
- assert "row2" in response
102
- assert "row3" not in response
100
+ assert "row1" in response . content
101
+ assert "row2" in response . content
102
+ assert "row3" not in response . content
103
103
104
104
async def test_run_tool_missing_params (self , get_n_rows_tool ):
105
- with pytest .raises (ValidationError , match = "Field required" ):
105
+ with pytest .raises (TypeError , match = "missing a required argument: 'num_rows' " ):
106
106
await get_n_rows_tool .acall ()
107
107
108
108
async def test_run_tool_wrong_param_type (self , get_n_rows_tool ):
@@ -152,7 +152,7 @@ async def test_run_tool_auth(self, toolbox, auth_token1):
152
152
)
153
153
auth_tool = tool .add_auth_token_getter ("my-test-auth" , lambda : auth_token1 )
154
154
response = await auth_tool .acall (id = "2" )
155
- assert "row2" in response
155
+ assert "row2" in response . content
156
156
157
157
async def test_run_tool_param_auth_no_auth (self , toolbox ):
158
158
"""Tests running a tool with a param requiring auth, without auth."""
@@ -170,9 +170,9 @@ async def test_run_tool_param_auth(self, toolbox, auth_token1):
170
170
auth_token_getters = {"my-test-auth" : lambda : auth_token1 },
171
171
)
172
172
response = await tool .acall ()
173
- assert "row4" in response
174
- assert "row5" in response
175
- assert "row6" in response
173
+ assert "row4" in response . content
174
+ assert "row5" in response . content
175
+ assert "row6" in response . content
176
176
177
177
async def test_run_tool_param_auth_no_field (self , toolbox , auth_token1 ):
178
178
"""Tests running a tool with a param requiring auth, with insufficient auth."""
@@ -236,16 +236,16 @@ def test_aload_toolset_all(self, toolbox):
236
236
async def test_run_tool_async (self , get_n_rows_tool ):
237
237
response = await get_n_rows_tool .acall (num_rows = "2" )
238
238
239
- assert "row1" in response
240
- assert "row2" in response
241
- assert "row3" not in response
239
+ assert "row1" in response . content
240
+ assert "row2" in response . content
241
+ assert "row3" not in response . content
242
242
243
243
def test_run_tool_sync (self , get_n_rows_tool ):
244
244
response = get_n_rows_tool .call (num_rows = "2" )
245
245
246
- assert "row1" in response
247
- assert "row2" in response
248
- assert "row3" not in response
246
+ assert "row1" in response . content
247
+ assert "row2" in response . content
248
+ assert "row3" not in response . content
249
249
250
250
def test_run_tool_missing_params (self , get_n_rows_tool ):
251
251
with pytest .raises (ValidationError , match = "Field required" ):
@@ -297,7 +297,7 @@ def test_run_tool_auth(self, toolbox, auth_token1):
297
297
)
298
298
auth_tool = tool .add_auth_token_getter ("my-test-auth" , lambda : auth_token1 )
299
299
response = auth_tool .call (id = "2" )
300
- assert "row2" in response
300
+ assert "row2" in response . content
301
301
302
302
def test_run_tool_param_auth_no_auth (self , toolbox ):
303
303
"""Tests running a tool with a param requiring auth, without auth."""
@@ -315,9 +315,9 @@ def test_run_tool_param_auth(self, toolbox, auth_token1):
315
315
auth_token_getters = {"my-test-auth" : lambda : auth_token1 },
316
316
)
317
317
response = tool .call ()
318
- assert "row4" in response
319
- assert "row5" in response
320
- assert "row6" in response
318
+ assert "row4" in response . content
319
+ assert "row5" in response . content
320
+ assert "row6" in response . content
321
321
322
322
def test_run_tool_param_auth_no_field (self , toolbox , auth_token1 ):
323
323
"""Tests running a tool with a param requiring auth, with insufficient auth."""
0 commit comments