cleanup Coder params

This commit is contained in:
Paul Gauthier 2023-05-18 18:21:44 -07:00
parent a59575fa4b
commit ba9307374e
3 changed files with 19 additions and 22 deletions

View file

@ -4,6 +4,7 @@ import unittest
from aider.commands import Commands
from aider.io import InputOutput as IO
from aider.coder import Coder
from unittest.mock import MagicMock # noqa: F401
class TestCommands(unittest.TestCase):
@ -12,18 +13,9 @@ class TestCommands(unittest.TestCase):
os.chdir(tmpdir)
io = IO(pretty=False, yes=True)
coder = Coder(
main_model="gpt-3.5-turbo",
fnames=[],
pretty=False,
show_diffs=False,
auto_commits=False,
io=io,
dry_run=False,
)
coder = Coder(io)
commands = Commands(io, coder)
# Mock the Confirm.ask method to return True for creating files
with unittest.mock.patch("rich.prompt.Confirm.ask", return_value=True):
commands.cmd_add("foo.txt bar.txt")