fix(tests): align BFL test assertions with implementation

- image_edit: get_supported_openai_params returns [] not [n, size, response_format]
- image_generation: remove response_format assertion (not in supported params)
- image_generation: unknown model raises ValueError, not defaults to flux-pro-1.1
This commit is contained in:
Chesars 2026-03-04 18:47:59 -03:00
parent 52d2ea237f
commit cf01ef5949
2 changed files with 7 additions and 8 deletions

View file

@ -46,9 +46,9 @@ class TestBlackForestLabsImageEditTransformation:
"""Test that supported OpenAI params are returned correctly."""
params = self.config.get_supported_openai_params(self.model)
assert "n" in params
assert "size" in params
assert "response_format" in params
# BFL image edit currently returns an empty list since it uses
# different parameter names mapped in map_openai_params
assert params == []
def test_map_openai_params_basic(self):
"""Test mapping of OpenAI params to BFL params."""

View file

@ -43,7 +43,6 @@ class TestBlackForestLabsImageGenerationTransformation:
assert "n" in params
assert "size" in params
assert "response_format" in params
assert "quality" in params
def test_map_openai_params_basic(self):
@ -179,10 +178,10 @@ class TestBlackForestLabsImageGenerationTransformation:
endpoint = self.config._get_model_endpoint("flux-pro")
assert endpoint == "/v1/flux-pro"
def test_get_model_endpoint_unknown_defaults(self):
"""Test that unknown models default to flux-pro-1.1."""
endpoint = self.config._get_model_endpoint("unknown-model")
assert endpoint == "/v1/flux-pro-1.1"
def test_get_model_endpoint_unknown_raises(self):
"""Test that unknown models raise ValueError."""
with pytest.raises(ValueError, match="Unknown BFL image generation model"):
self.config._get_model_endpoint("unknown-model")
def test_get_model_endpoint_with_provider_prefix(self):
"""Test that provider prefix is stripped from model name."""