mirror of
https://github.com/Aider-AI/aider
synced 2026-04-26 01:25:17 +02:00
fix: Mock InputOutput object correctly in test_architect_coder_auto_accept_true
This commit is contained in:
@@ -37,8 +37,9 @@ class TestCoder(unittest.TestCase):
|
||||
repo.git.commit("-m", "init")
|
||||
|
||||
# YES!
|
||||
io = InputOutput(yes=True)
|
||||
io.confirm_ask = MagicMock() # Mock the confirm_ask method
|
||||
# Use a completely mocked IO object instead of a real one
|
||||
io = MagicMock()
|
||||
io.confirm_ask = MagicMock(return_value=True)
|
||||
coder = Coder.create(self.GPT35, None, io, fnames=["added.txt"])
|
||||
|
||||
self.assertTrue(coder.allowed_to_edit("added.txt"))
|
||||
|
||||
Reference in New Issue
Block a user