From a5327af5e9ef31b68a4345a6679b66b72a9c09fc Mon Sep 17 00:00:00 2001 From: "Andrew Grigorev (aider)" Date: Sat, 12 Apr 2025 17:12:30 +0300 Subject: [PATCH] test: fix mock setup for co-authored-by commit test --- tests/basic/test_repo.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/basic/test_repo.py b/tests/basic/test_repo.py index d0441a4da..631e6f606 100644 --- a/tests/basic/test_repo.py +++ b/tests/basic/test_repo.py @@ -236,8 +236,9 @@ class TestRepo(unittest.TestCase): mock_coder.args.attribute_commit_message_author = False mock_coder.args.attribute_commit_message_committer = False # Set the model name correctly on the nested mock - mock_coder.model = MagicMock() - mock_coder.model.configure_mock(name="gpt-test") + # The code uses coder.main_model.name for the co-authored-by line + mock_coder.main_model = MagicMock() + mock_coder.main_model.name = "gpt-test" io = InputOutput()