mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 14:55:00 +00:00
Refactor test_get_commit_message to use the correct import and handle the return value of mock_send correctly.
This commit is contained in:
parent
6f3b498228
commit
a789de9433
1 changed files with 5 additions and 2 deletions
|
@ -15,10 +15,13 @@ from tests.utils import GitTemporaryDirectory
|
||||||
|
|
||||||
|
|
||||||
class TestRepo(unittest.TestCase):
|
class TestRepo(unittest.TestCase):
|
||||||
@patch("aider.sendchat.send_with_retries")
|
@patch("aider.repo.send_with_retries")
|
||||||
def test_get_commit_message(self, mock_send):
|
def test_get_commit_message(self, mock_send):
|
||||||
# Set the return value of the mocked function
|
# Set the return value of the mocked function
|
||||||
mock_send.return_value = "a good commit message"
|
mock_send.return_value = (
|
||||||
|
None,
|
||||||
|
"a good commit message"
|
||||||
|
)
|
||||||
|
|
||||||
repo = AiderRepo(InputOutput(), None)
|
repo = AiderRepo(InputOutput(), None)
|
||||||
# Call the get_commit_message method with dummy diff and context
|
# Call the get_commit_message method with dummy diff and context
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue