Skip to content

Commit

Permalink
deserialze json string to python list for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
emma0925 committed Dec 11, 2024
1 parent 75f1829 commit 13184a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libs/genai/tests/integration_tests/test_chat_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,8 @@ class MyModel(typing_extensions.TypedDict):
]

response = llm.invoke(messages)
assert isinstance(response.content, list)
response_data = json.loads(response.content)
assert isinstance(response_data, list)
assert len(response.content) > 1
assert isinstance(response.content[0], MyModel)
for item in response.content:
Expand Down

0 comments on commit 13184a1

Please sign in to comment.