From 124ab7dd992abf74c7758359583ee960015bc2ac Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Tue, 20 Jun 2023 17:27:48 -0700 Subject: [PATCH] fixed test --- tests/test_commands.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tests/test_commands.py b/tests/test_commands.py index 223c33acd..8d5d6790c 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -2,8 +2,8 @@ import os import shutil import tempfile from unittest import TestCase -from unittest.mock import patch +from aider import models from aider.commands import Commands from aider.io import InputOutput @@ -14,22 +14,16 @@ class TestCommands(TestCase): self.tempdir = tempfile.mkdtemp() os.chdir(self.tempdir) - self.patcher = patch("aider.coder.Coder.check_model_availability") - self.mock_check = self.patcher.start() - self.mock_check.return_value = True - def tearDown(self): os.chdir(self.original_cwd) shutil.rmtree(self.tempdir) - self.patcher.stop() - def test_cmd_add(self): # Initialize the Commands and InputOutput objects io = InputOutput(pretty=False, yes=True) - from aider.coder import Coder + from aider.coders import Coder - coder = Coder(io, openai_api_key="deadbeef") + coder = Coder.create(models.GPT35, io, openai_api_key="deadbeef") commands = Commands(io, coder) # Call the cmd_add method with 'foo.txt' and 'bar.txt' as a single string