mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-23 13:54:59 +00:00
test: update test assertions to check model objects instead of names
This commit is contained in:
parent
ccf460c1f7
commit
c9c2d5ab6f
2 changed files with 6 additions and 6 deletions
|
@ -91,9 +91,9 @@ class TestChatSummary(TestCase):
|
||||||
# Check that both models were tried
|
# Check that both models were tried
|
||||||
self.assertEqual(mock_send.call_count, 2)
|
self.assertEqual(mock_send.call_count, 2)
|
||||||
|
|
||||||
# Check that the calls were made with the correct model names
|
# Check that the calls were made with the correct models
|
||||||
self.assertEqual(mock_send.call_args_list[0][0][0], "gpt-4")
|
self.assertEqual(mock_send.call_args_list[0][0][0], mock_model1)
|
||||||
self.assertEqual(mock_send.call_args_list[1][0][0], "gpt-3.5-turbo")
|
self.assertEqual(mock_send.call_args_list[1][0][0], mock_model2)
|
||||||
|
|
||||||
# Check that we got a summary from the second model
|
# Check that we got a summary from the second model
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
|
|
|
@ -125,9 +125,9 @@ class TestRepo(unittest.TestCase):
|
||||||
# Check that simple_send_with_retries was called twice
|
# Check that simple_send_with_retries was called twice
|
||||||
self.assertEqual(mock_send.call_count, 2)
|
self.assertEqual(mock_send.call_count, 2)
|
||||||
|
|
||||||
# Check that it was called with the correct model names
|
# Check that it was called with the correct models
|
||||||
self.assertEqual(mock_send.call_args_list[0][0][0], model1.name)
|
self.assertEqual(mock_send.call_args_list[0][0][0], model1)
|
||||||
self.assertEqual(mock_send.call_args_list[1][0][0], model2.name)
|
self.assertEqual(mock_send.call_args_list[1][0][0], model2)
|
||||||
|
|
||||||
# Check that the content of the messages is the same for both calls
|
# Check that the content of the messages is the same for both calls
|
||||||
self.assertEqual(mock_send.call_args_list[0][0][1], mock_send.call_args_list[1][0][1])
|
self.assertEqual(mock_send.call_args_list[0][0][1], mock_send.call_args_list[1][0][1])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue