From 0563ab0652218d62e09905893f78ac603d92b6d1 Mon Sep 17 00:00:00 2001 From: alt-glitch Date: Fri, 29 May 2026 22:21:55 +0530 Subject: [PATCH] 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. --- .../test_video_generation_tool_surface_matrix.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/tools/test_video_generation_tool_surface_matrix.py b/tests/tools/test_video_generation_tool_surface_matrix.py index e15245686..edd39b550 100644 --- a/tests/tools/test_video_generation_tool_surface_matrix.py +++ b/tests/tools/test_video_generation_tool_surface_matrix.py @@ -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