From b89eb2917401386411c72bde56d2a5cfb70936f3 Mon Sep 17 00:00:00 2001 From: teknium1 Date: Fri, 6 Mar 2026 03:53:43 -0800 Subject: [PATCH] =?UTF-8?q?fix:=20correct=20mock=20tool=20name=20'search'?= =?UTF-8?q?=20=E2=86=92=20'search=5Ffiles'=20in=20test=5Fcode=5Fexecution?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The mock handler checked for function_name == 'search' but the RPC sends 'search_files'. Any test exercising search_files through the mock would get 'Unknown tool' instead of the canned response. --- tests/tools/test_code_execution.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tools/test_code_execution.py b/tests/tools/test_code_execution.py index 70ecbe90..7c39c9e1 100644 --- a/tests/tools/test_code_execution.py +++ b/tests/tools/test_code_execution.py @@ -37,7 +37,7 @@ def _mock_handle_function_call(function_name, function_args, task_id=None, user_ return json.dumps({"content": "line 1\nline 2\nline 3\n", "total_lines": 3}) if function_name == "write_file": return json.dumps({"status": "ok", "path": function_args.get("path", "")}) - if function_name == "search": + if function_name == "search_files": return json.dumps({"matches": [{"file": "test.py", "line": 1, "text": "match"}]}) if function_name == "patch": return json.dumps({"status": "ok", "replacements": 1})