mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-25 23:05:00 +00:00
fix: Mock repo.get_commit_message instead of aider.sendchat.simple_send_with_retries
This commit is contained in:
parent
d1fb4c5ab7
commit
364fda461f
1 changed files with 2 additions and 4 deletions
|
@ -816,10 +816,8 @@ class TestCommands(TestCase):
|
||||||
# Modify the file to make it dirty
|
# Modify the file to make it dirty
|
||||||
file_path.write_text("Modified content")
|
file_path.write_text("Modified content")
|
||||||
|
|
||||||
# Mock simple_send_with_retries to return a canned commit message
|
# Mock repo.get_commit_message to return a canned commit message
|
||||||
with mock.patch("aider.sendchat.simple_send_with_retries") as mock_send:
|
with mock.patch.object(repo, "get_commit_message", return_value="Canned commit message"):
|
||||||
mock_send.return_value = [{"content": "Canned commit message"}]
|
|
||||||
|
|
||||||
# Run cmd_commit
|
# Run cmd_commit
|
||||||
commands.cmd_commit()
|
commands.cmd_commit()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue