mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
test(test_proxy_exception_mapping.py): fix exception checking
This commit is contained in:
parent
8283c4f7c7
commit
6506fba3bc
1 changed files with 3 additions and 3 deletions
|
@ -123,7 +123,7 @@ def test_exception_openai_bad_model(client):
|
|||
response=response
|
||||
)
|
||||
print("Type of exception=", type(openai_exception))
|
||||
assert isinstance(openai_exception, openai.NotFoundError)
|
||||
assert isinstance(openai_exception, openai.BadRequestError)
|
||||
|
||||
except Exception as e:
|
||||
pytest.fail(f"LiteLLM Proxy test failed. Exception {str(e)}")
|
||||
|
@ -149,7 +149,7 @@ def test_chat_completion_exception_any_model(client):
|
|||
response=response
|
||||
)
|
||||
print("Exception raised=", openai_exception)
|
||||
assert isinstance(openai_exception, openai.NotFoundError)
|
||||
assert isinstance(openai_exception, openai.BadRequestError)
|
||||
|
||||
except Exception as e:
|
||||
pytest.fail(f"LiteLLM Proxy test failed. Exception {str(e)}")
|
||||
|
@ -170,7 +170,7 @@ def test_embedding_exception_any_model(client):
|
|||
response=response
|
||||
)
|
||||
print("Exception raised=", openai_exception)
|
||||
assert isinstance(openai_exception, openai.NotFoundError)
|
||||
assert isinstance(openai_exception, openai.BadRequestError)
|
||||
|
||||
except Exception as e:
|
||||
pytest.fail(f"LiteLLM Proxy test failed. Exception {str(e)}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue