Skip to content

Commit

Permalink
fix: deprecate function return in new test (#2309)
Browse files Browse the repository at this point in the history
  • Loading branch information
carenthomas authored Dec 22, 2024
1 parent 3b94b45 commit 69e3764
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,16 +400,16 @@ def always_error():

response_message = None
for message in response.messages:
if isinstance(message, FunctionReturn):
if isinstance(message, ToolReturnMessage):
response_message = message
break

assert response_message, "FunctionReturn message not found in response"
assert response_message, "ToolReturnMessage message not found in response"
assert response_message.status == "error"
if isinstance(client, RESTClient):
assert response_message.function_return == "Error executing function always_error: ZeroDivisionError: division by zero"
assert response_message.tool_return == "Error executing function always_error: ZeroDivisionError: division by zero"
else:
response_json = json.loads(response_message.function_return)
response_json = json.loads(response_message.tool_return)
assert response_json['status'] == "Failed"
assert response_json['message'] == "Error executing function always_error: ZeroDivisionError: division by zero"

Expand Down

0 comments on commit 69e3764

Please sign in to comment.