From 364fda461ff7a225197f0aaa8177eeb602d7dbc7 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Sat, 10 Aug 2024 09:10:42 -0700 Subject: [PATCH] fix: Mock repo.get_commit_message instead of aider.sendchat.simple_send_with_retries --- tests/basic/test_commands.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/basic/test_commands.py b/tests/basic/test_commands.py index 1d74b4bfa..1f6356c15 100644 --- a/tests/basic/test_commands.py +++ b/tests/basic/test_commands.py @@ -816,10 +816,8 @@ class TestCommands(TestCase): # Modify the file to make it dirty file_path.write_text("Modified content") - # Mock simple_send_with_retries to return a canned commit message - with mock.patch("aider.sendchat.simple_send_with_retries") as mock_send: - mock_send.return_value = [{"content": "Canned commit message"}] - + # Mock repo.get_commit_message to return a canned commit message + with mock.patch.object(repo, "get_commit_message", return_value="Canned commit message"): # Run cmd_commit commands.cmd_commit()