test: Fix patch target for simple_send_with_retries in tests

This commit is contained in:
Paul Gauthier (aider) 2025-02-04 12:06:59 -08:00
parent 535b3ce286
commit 9553478384

View file

@ -34,7 +34,7 @@ class TestChatSummary(TestCase):
tokenized = self.chat_summary.tokenize(messages) tokenized = self.chat_summary.tokenize(messages)
self.assertEqual(tokenized, [(2, messages[0]), (2, messages[1])]) self.assertEqual(tokenized, [(2, messages[0]), (2, messages[1])])
@mock.patch("aider.history.simple_send_with_retries") @mock.patch("aider.models.Model.simple_send_with_retries")
def test_summarize_all(self, mock_send): def test_summarize_all(self, mock_send):
mock_send.return_value = "This is a summary" mock_send.return_value = "This is a summary"
messages = [ messages = [
@ -69,7 +69,7 @@ class TestChatSummary(TestCase):
self.assertGreater(len(result), 0) self.assertGreater(len(result), 0)
self.assertLessEqual(len(result), len(messages)) self.assertLessEqual(len(result), len(messages))
@mock.patch("aider.history.simple_send_with_retries") @mock.patch("aider.models.Model.simple_send_with_retries")
def test_fallback_to_second_model(self, mock_send): def test_fallback_to_second_model(self, mock_send):
mock_model1 = mock.Mock(spec=Model) mock_model1 = mock.Mock(spec=Model)
mock_model1.name = "gpt-4" mock_model1.name = "gpt-4"