fix(test): add fal_client.submit stub to surface matrix test

The plugin switched from fal_client.subscribe() to submit()+handle.get().
The test mock only had subscribe, causing CI failures.
This commit is contained in:
alt-glitch 2026-05-29 22:21:55 +05:30 committed by Siddharth Balyan
parent e46e4bcf47
commit 0563ab0652

View file

@ -46,6 +46,18 @@ def matrix_env(tmp_path, monkeypatch):
fal_calls.append({"endpoint": endpoint, "arguments": arguments})
return {"video": {"url": f"https://fake-fal/{endpoint.replace('/','_')}.mp4"}}
fake_fal.subscribe = _subscribe # type: ignore
class _FalHandle:
def __init__(self, result):
self._result = result
def get(self):
return self._result
def _submit(endpoint, arguments=None, headers=None):
fal_calls.append({"endpoint": endpoint, "arguments": arguments})
return _FalHandle({"video": {"url": f"https://fake-fal/{endpoint.replace('/','_')}.mp4"}})
fake_fal.submit = _submit # type: ignore
monkeypatch.setitem(__import__("sys").modules, "fal_client", fake_fal)
# httpx stub for xAI