feat: update test to correctly access message content

The test for `test_get_commit_message_with_custom_prompt` has been updated to correctly access the message content from the positional arguments of the `simple_send_with_retries` function call. This ensures that the test accurately reflects the implementation in the `GitRepo` class.
This commit is contained in:
Paul Gauthier (aider) 2024-07-31 09:51:28 -03:00
parent 2212613c47
commit 5bfedea9ff

View file

@ -158,8 +158,8 @@ class TestRepo(unittest.TestCase):
self.assertEqual(result, "Custom commit message")
mock_send.assert_called_once()
_, kwargs = mock_send.call_args
self.assertEqual(kwargs["messages"][0]["content"], custom_prompt)
args, _ = mock_send.call_args
self.assertEqual(args[1][0]["content"], custom_prompt)
@patch("aider.repo.GitRepo.get_commit_message")
def test_commit_with_custom_committer_name(self, mock_send):