From 1507b23e30a2175de7ffcd907b72da5c27e08dc4 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Sat, 20 Apr 2024 12:11:54 -0700 Subject: [PATCH] test(test_openai_endpoints.py): make test stricter --- proxy_server_config.yaml | 6 +++--- tests/test_openai_endpoints.py | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/proxy_server_config.yaml b/proxy_server_config.yaml index dcd5c6855..7c2d74267 100644 --- a/proxy_server_config.yaml +++ b/proxy_server_config.yaml @@ -96,9 +96,9 @@ litellm_settings: router_settings: routing_strategy: usage-based-routing-v2 - redis_host: os.environ/REDIS_HOST - redis_password: os.environ/REDIS_PASSWORD - redis_port: os.environ/REDIS_PORT + # redis_host: os.environ/REDIS_HOST + # redis_password: os.environ/REDIS_PASSWORD + # redis_port: os.environ/REDIS_PORT enable_pre_call_checks: true general_settings: diff --git a/tests/test_openai_endpoints.py b/tests/test_openai_endpoints.py index 465817d83..c77eeba5b 100644 --- a/tests/test_openai_endpoints.py +++ b/tests/test_openai_endpoints.py @@ -260,7 +260,10 @@ async def test_chat_completion_ratelimit(): await asyncio.gather(*tasks) pytest.fail("Expected at least 1 call to fail") except Exception as e: - pass + if "Request did not return a 200 status code: 429" in str(e): + pass + else: + pytest.fail(f"Wrong error received - {str(e)}") @pytest.mark.asyncio