From eb28e228913fdc0c90b62168bb4b57475a91e22c Mon Sep 17 00:00:00 2001 From: "Andrew Grigorev (aider)" Date: Sat, 12 Apr 2025 17:07:41 +0300 Subject: [PATCH] test: fix mock setup for model name in co-authored-by test --- tests/basic/test_repo.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/basic/test_repo.py b/tests/basic/test_repo.py index 7e288e063..4ff694714 100644 --- a/tests/basic/test_repo.py +++ b/tests/basic/test_repo.py @@ -235,7 +235,9 @@ class TestRepo(unittest.TestCase): mock_coder.args.attribute_committer = None # Explicitly None to test override mock_coder.args.attribute_commit_message_author = False mock_coder.args.attribute_commit_message_committer = False - mock_coder.model.name = "gpt-test" + # Set the model name correctly on the nested mock + mock_coder.model = MagicMock(name="gpt-test") + io = InputOutput() git_repo = GitRepo(io, None, None)