Skip to content

Commit

Permalink
test: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
krrishdholakia committed Jan 29, 2025
1 parent c8f5f06 commit 78cf3f3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/local_testing/test_stream_chunk_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,14 @@ def test_stream_chunk_builder_openai_audio_output_usage():
print(f"response_usage_value: {response_usage_value}")
print(f"type: {type(response_usage_value)}")
if isinstance(response_usage_value, BaseModel):
assert response_usage_value.model_dump(exclude_none=True) == v
response_usage_value_dict = response_usage_value.model_dump(
exclude_none=True
)
if isinstance(v, dict):
for key, value in v.items():
assert response_usage_value_dict[key] == value
else:
assert response_usage_value_dict == v
else:
assert response_usage_value == v

Expand Down

0 comments on commit 78cf3f3

Please sign in to comment.