fix: correct mock tool name 'search' → 'search_files' in test_code_execution

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.
This commit is contained in:
teknium1
2026-03-06 03:53:43 -08:00
parent 3670089a42
commit b89eb29174

View File

@@ -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})