mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-16 09:22:22 +00:00
fix(minimax): tighten image generation exception assertions
This commit is contained in:
parent
f8a406b6ae
commit
0c5281de53
1 changed files with 3 additions and 2 deletions
|
|
@ -14,6 +14,7 @@ import pytest
|
|||
|
||||
from litellm.llms.minimax.image_generation.transformation import (
|
||||
MinimaxImageGenerationConfig,
|
||||
MinimaxImageGenerationException,
|
||||
)
|
||||
from litellm.types.utils import ImageResponse
|
||||
|
||||
|
|
@ -148,7 +149,7 @@ class TestMinimaxImageGenerationTransformation:
|
|||
def test_validate_environment_missing_api_key(self, mock_get_secret):
|
||||
mock_get_secret.return_value = None
|
||||
|
||||
with pytest.raises(ValueError):
|
||||
with pytest.raises(ValueError, match="MiniMax API key is required"):
|
||||
self.config.validate_environment(
|
||||
headers={},
|
||||
model=self.model,
|
||||
|
|
@ -250,7 +251,7 @@ class TestMinimaxImageGenerationTransformation:
|
|||
}
|
||||
)
|
||||
|
||||
with pytest.raises(Exception):
|
||||
with pytest.raises(MinimaxImageGenerationException, match="invalid api key"):
|
||||
self.config.transform_image_generation_response(
|
||||
model=self.model,
|
||||
raw_response=raw_response,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue