test(test_completion.py): handle async watsonx call fail

This commit is contained in:
Krrish Dholakia 2024-05-13 18:40:51 -07:00
parent d4123951d9
commit 724d880a45
2 changed files with 2 additions and 1 deletions

View file

@ -15,7 +15,6 @@ import dotenv, traceback, random, asyncio, time, contextvars
from copy import deepcopy from copy import deepcopy
import httpx import httpx
import litellm import litellm
from ._logging import verbose_logger from ._logging import verbose_logger
from litellm import ( # type: ignore from litellm import ( # type: ignore
client, client,

View file

@ -3427,6 +3427,8 @@ async def test_acompletion_watsonx():
) )
# Add any assertions here to check the response # Add any assertions here to check the response
print(response) print(response)
except litellm.RateLimitError as e:
pass
except Exception as e: except Exception as e:
pytest.fail(f"Error occurred: {e}") pytest.fail(f"Error occurred: {e}")