mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-11 22:51:28 +00:00
Merge pull request #40643 from BerriAI/litellm_fix_optional_logging_assertions
test: respect optional logging payload fields
This commit is contained in:
commit
41b0deb627
2 changed files with 3 additions and 3 deletions
|
|
@ -1076,7 +1076,7 @@ def test_standard_logging_payload(model, turn_off_message_logging):
|
|||
)
|
||||
)
|
||||
|
||||
keys_list = list(StandardLoggingPayload.__annotations__.keys())
|
||||
keys_list = list(StandardLoggingPayload.__required_keys__)
|
||||
|
||||
for k in keys_list:
|
||||
assert (
|
||||
|
|
@ -1190,7 +1190,7 @@ def test_standard_logging_payload_audio(turn_off_message_logging, stream):
|
|||
)
|
||||
)
|
||||
|
||||
keys_list = list(StandardLoggingPayload.__annotations__.keys())
|
||||
keys_list = list(StandardLoggingPayload.__required_keys__)
|
||||
|
||||
for k in keys_list:
|
||||
assert (
|
||||
|
|
|
|||
|
|
@ -270,7 +270,7 @@ async def test_datadog_logging_http_request():
|
|||
message = json.loads(body[0]["message"])
|
||||
print("logged message", json.dumps(message, indent=4))
|
||||
|
||||
expected_message_fields = StandardLoggingPayload.__annotations__.keys()
|
||||
expected_message_fields = StandardLoggingPayload.__required_keys__
|
||||
|
||||
for field in expected_message_fields:
|
||||
assert field in message, f"Field '{field}' is missing from the message"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue