From f12141be4463f5fab6c41f160b3b45fd5deb691d Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Mon, 25 Nov 2024 21:44:12 -0800 Subject: [PATCH] fix anthropic pt logging test --- tests/pass_through_tests/test_anthropic_passthrough.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/pass_through_tests/test_anthropic_passthrough.py b/tests/pass_through_tests/test_anthropic_passthrough.py index b062a025a22f..6e7839282c60 100644 --- a/tests/pass_through_tests/test_anthropic_passthrough.py +++ b/tests/pass_through_tests/test_anthropic_passthrough.py @@ -141,7 +141,9 @@ async def test_anthropic_basic_completion_with_headers(): ), "Start time should be before end time" # Metadata assertions - assert log_entry["cache_hit"] == "False", "Cache should be off" + assert ( + str(log_entry["cache_hit"]).lower() != "true" + ), "Cache should be off" assert log_entry["request_tags"] == [ "test-tag-1", "test-tag-2", @@ -251,7 +253,9 @@ async def test_anthropic_streaming_with_headers(): ), "Start time should be before end time" # Metadata assertions - assert log_entry["cache_hit"] == "False", "Cache should be off" + assert ( + str(log_entry["cache_hit"]).lower() != "true" + ), "Cache should be off" assert log_entry["request_tags"] == [ "test-tag-stream-1", "test-tag-stream-2",