test(video_gen): cover gateway decision matrix gaps and 4xx error path

- Add test for 4xx ValueError with actionable remediation message
- Add test for is_available() returning True via managed gateway
- Add test for prefers_gateway overriding direct FAL_KEY
- Add test for is_available() via gateway in plugin test file
This commit is contained in:
alt-glitch
2026-05-29 22:26:24 +05:30
committed by Siddharth Balyan
parent d04b3c193e
commit b6294ea9f1
2 changed files with 82 additions and 0 deletions
@@ -105,6 +105,19 @@ def test_fal_generate_requires_fal_key(monkeypatch):
assert result["error_type"] == "auth_required"
def test_fal_available_via_gateway(monkeypatch):
from plugins.video_gen.fal import FALVideoGenProvider
from plugins.video_gen import fal as fal_plugin
monkeypatch.delenv("FAL_KEY", raising=False)
monkeypatch.setattr(
fal_plugin,
"_resolve_managed_fal_video_gateway",
lambda: object(), # truthy sentinel — gateway is available
)
assert FALVideoGenProvider().is_available() is True
class TestFamilyRouting:
"""The headline behavior: image_url presence picks the endpoint."""