mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 08:44:59 +00:00
test: update sanity_check_models_bogus_editor to expect two warnings
This commit is contained in:
parent
97d6b68613
commit
875fb3a178
1 changed files with 5 additions and 8 deletions
|
@ -69,14 +69,11 @@ class TestModels(unittest.TestCase):
|
||||||
|
|
||||||
result = sanity_check_models(mock_io, main_model)
|
result = sanity_check_models(mock_io, main_model)
|
||||||
|
|
||||||
self.assertTrue(
|
self.assertTrue(result) # Should return True because there's a problem with the editor model
|
||||||
result
|
mock_io.tool_warning.assert_called_with(ANY) # Ensure a warning was issued
|
||||||
) # Should return True because there's a problem with the editor model
|
self.assertEqual(mock_io.tool_warning.call_count, 2) # Expect two warnings
|
||||||
mock_io.tool_warning.assert_called_once() # Ensure a warning was issued
|
warning_messages = [call.args[0] for call in mock_io.tool_warning.call_args_list]
|
||||||
warning_message = mock_io.tool_warning.call_args[0][0]
|
self.assertTrue(any("bogus-model" in msg for msg in warning_messages)) # Check that one of the warnings mentions the bogus model
|
||||||
self.assertIn(
|
|
||||||
"bogus-model", warning_message
|
|
||||||
) # Check that the warning mentions the bogus model
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue