The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
test_long_term_spend_accuracy_with_bursts
Ishaan Jaffa753fc9d9f8c
diff --git a/tests/otel_tests/local_test_spend_accuracy_tests.py b/tests/otel_tests/local_test_spend_accuracy_tests.pyindex bbb12c58a1c..d60bc985a6c 100644--- a/tests/otel_tests/local_test_spend_accuracy_tests.py+++ b/tests/otel_tests/local_test_spend_accuracy_tests.py@@ -266,14 +266,14 @@ async def test_long_term_spend_accuracy_with_bursts():abs(key_info["info"]["spend"] - expected_spend) < TOLERANCE), f"Key spend {key_info['info']['spend']} does not match expected {expected_spend}"- # assert (- # abs(user_info["user_info"]["spend"] - expected_spend) < TOLERANCE- # ), f"User spend {user_info['user_info']['spend']} does not match expected {expected_spend}"+ assert (+ abs(user_info["user_info"]["spend"] - expected_spend) < TOLERANCE+ ), f"User spend {user_info['user_info']['spend']} does not match expected {expected_spend}"- # assert (- # abs(team_info["team_info"]["spend"] - expected_spend) < TOLERANCE- # ), f"Team spend {team_info['team_info']['spend']} does not match expected {expected_spend}"+ assert (+ abs(team_info["team_info"]["spend"] - expected_spend) < TOLERANCE+ ), f"Team spend {team_info['team_info']['spend']} does not match expected {expected_spend}"- # assert (- # abs(org_info["spend"] - expected_spend) < TOLERANCE- # ), f"Organization spend {org_info['spend']} does not match expected {expected_spend}"+ assert (+ abs(org_info["spend"] - expected_spend) < TOLERANCE+ ), f"Organization spend {org_info['spend']} does not match expected {expected_spend}"diff --git a/tests/proxy_unit_tests/test_update_spend.py b/tests/proxy_unit_tests/test_update_spend.pyindex 641768a7d2e..1fb2479792b 100644--- a/tests/proxy_unit_tests/test_update_spend.py+++ b/tests/proxy_unit_tests/test_update_spend.py@@ -27,12 +27,6 @@ class MockPrismaClient:# Initialize transaction listsself.spend_log_transactions = []- self.user_list_transactons = {}- self.end_user_list_transactons = {}- self.key_list_transactons = {}- self.team_list_transactons = {}- self.team_member_list_transactons = {}- self.org_list_transactons = {}self.daily_user_spend_transactions = {}def jsonify_object(self, obj):