mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-21 04:44:59 +00:00
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:
parent
2212613c47
commit
5bfedea9ff
1 changed files with 2 additions and 2 deletions
|
@ -158,8 +158,8 @@ class TestRepo(unittest.TestCase):
|
||||||
|
|
||||||
self.assertEqual(result, "Custom commit message")
|
self.assertEqual(result, "Custom commit message")
|
||||||
mock_send.assert_called_once()
|
mock_send.assert_called_once()
|
||||||
_, kwargs = mock_send.call_args
|
args, _ = mock_send.call_args
|
||||||
self.assertEqual(kwargs["messages"][0]["content"], custom_prompt)
|
self.assertEqual(args[1][0]["content"], custom_prompt)
|
||||||
|
|
||||||
@patch("aider.repo.GitRepo.get_commit_message")
|
@patch("aider.repo.GitRepo.get_commit_message")
|
||||||
def test_commit_with_custom_committer_name(self, mock_send):
|
def test_commit_with_custom_committer_name(self, mock_send):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue