From 122dff007b2b4a5645e54c1918eddbcef50abe79 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Fri, 5 Apr 2024 20:38:28 -0700 Subject: [PATCH] fix gemini test --- litellm/tests/test_streaming.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/litellm/tests/test_streaming.py b/litellm/tests/test_streaming.py index b9e9d196ea..e11183938c 100644 --- a/litellm/tests/test_streaming.py +++ b/litellm/tests/test_streaming.py @@ -487,8 +487,13 @@ async def test_acompletion_gemini_stream(): raise Exception("Empty response received") except litellm.APIError as e: pass + except litellm.RateLimitError as e: + pass except Exception as e: - pytest.fail(f"Error occurred: {e}") + if "429 Resource has been exhausted" in str(e): + pass + else: + pytest.fail(f"Error occurred: {e}") # asyncio.run(test_acompletion_gemini_stream())