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:
parent
e46e4bcf47
commit
0563ab0652
1 changed files with 12 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue