test(test_alangfuse.py): fix test to expect correct response object

This commit is contained in:
Krrish Dholakia 2024-07-11 07:58:26 -07:00
parent a5b8db7f3a
commit 57607dfc47
2 changed files with 91 additions and 77 deletions

File diff suppressed because one or more lines are too long

View file

@ -237,6 +237,8 @@ async def test_langfuse_logging_without_request_response(stream, langfuse_client
assert _trace_data[0].output == {
"role": "assistant",
"content": "redacted-by-litellm",
"function_call": None,
"tool_calls": None,
}
except Exception as e:
@ -273,7 +275,12 @@ async def test_langfuse_masked_input_output(langfuse_client):
expected_output = (
"redacted-by-litellm"
if mask_value
else {"content": "This is a test response", "role": "assistant"}
else {
"content": "This is a test response",
"role": "assistant",
"function_call": None,
"tool_calls": None,
}
)
langfuse_client.flush()
await asyncio.sleep(2)