mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-20 04:14:59 +00:00
fix: Mock InputOutput object correctly in test_architect_coder_auto_accept_true
This commit is contained in:
parent
b5cd39cc50
commit
79b8e50412
1 changed files with 3 additions and 2 deletions
|
@ -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"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue