test: fix mock setup for co-authored-by commit test

This commit is contained in:
Andrew Grigorev (aider) 2025-04-12 17:12:30 +03:00 committed by Andrew Grigorev
parent 192f8bec26
commit a5327af5e9

View file

@ -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()