From a789de9433241b2053af2374f9cade87d94eb4ee Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 21 Jul 2023 14:27:31 -0300 Subject: [PATCH] Refactor test_get_commit_message to use the correct import and handle the return value of mock_send correctly. --- tests/test_repo.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_repo.py b/tests/test_repo.py index 41a8a791d..efa18bf99 100644 --- a/tests/test_repo.py +++ b/tests/test_repo.py @@ -15,10 +15,13 @@ from tests.utils import GitTemporaryDirectory class TestRepo(unittest.TestCase): - @patch("aider.sendchat.send_with_retries") + @patch("aider.repo.send_with_retries") def test_get_commit_message(self, mock_send): # Set the return value of the mocked function - mock_send.return_value = "a good commit message" + mock_send.return_value = ( + None, + "a good commit message" + ) repo = AiderRepo(InputOutput(), None) # Call the get_commit_message method with dummy diff and context