mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 19:24:27 +00:00
test - invalid model name passed test
This commit is contained in:
parent
b308f8c079
commit
1031ffdae5
1 changed files with 4 additions and 1 deletions
|
@ -167,8 +167,9 @@ def test_chat_completion_exception_any_model(client):
|
|||
openai_exception = openai_client._make_status_error_from_response(
|
||||
response=response
|
||||
)
|
||||
print("Exception raised=", openai_exception)
|
||||
assert isinstance(openai_exception, openai.BadRequestError)
|
||||
_error_message = openai_exception.message
|
||||
assert "Invalid model name passed in model=Lite-GPT-12" in str(_error_message)
|
||||
|
||||
except Exception as e:
|
||||
pytest.fail(f"LiteLLM Proxy test failed. Exception {str(e)}")
|
||||
|
@ -195,6 +196,8 @@ def test_embedding_exception_any_model(client):
|
|||
)
|
||||
print("Exception raised=", openai_exception)
|
||||
assert isinstance(openai_exception, openai.BadRequestError)
|
||||
_error_message = openai_exception.message
|
||||
assert "Invalid model name passed in model=Lite-GPT-12" in str(_error_message)
|
||||
|
||||
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