From 912efe11b57bade7586c9caf484747914d2da692 Mon Sep 17 00:00:00 2001 From: 0xbyt4 <35742124+0xbyt4@users.noreply.github.com> Date: Mon, 9 Mar 2026 13:25:52 +0300 Subject: [PATCH] fix(tests): add content attribute to fake result objects _FakeReadResult and _FakeSearchResult now expose the attributes that read_file_tool/search_tool access after the redact_sensitive_text integration from main. --- tests/tools/test_read_loop_detection.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/tools/test_read_loop_detection.py b/tests/tools/test_read_loop_detection.py index d5f38a3d..dfa1c1ab 100644 --- a/tests/tools/test_read_loop_detection.py +++ b/tests/tools/test_read_loop_detection.py @@ -29,11 +29,11 @@ from tools.file_tools import ( class _FakeReadResult: """Minimal stand-in for FileOperations.read_file return value.""" def __init__(self, content="line1\nline2\n", total_lines=2): - self._content = content + self.content = content self._total_lines = total_lines def to_dict(self): - return {"content": self._content, "total_lines": self._total_lines} + return {"content": self.content, "total_lines": self._total_lines} def _fake_read_file(path, offset=1, limit=500): @@ -42,6 +42,9 @@ def _fake_read_file(path, offset=1, limit=500): class _FakeSearchResult: """Minimal stand-in for FileOperations.search return value.""" + def __init__(self): + self.matches = [] + def to_dict(self): return {"matches": [{"file": "test.py", "line": 1, "text": "match"}]}