test(test_router.py): handle rate limiting error

This commit is contained in:
Krrish Dholakia 2024-01-11 00:00:17 +05:30
parent 61f2fe5837
commit 969594a4b1

View file

@ -495,6 +495,8 @@ def test_img_gen_on_router():
print(response)
assert len(response.data) > 0
router.reset()
except litellm.RateLimitError as e:
pass
except Exception as e:
traceback.print_exc()
pytest.fail(f"Error occurred: {e}")