mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 16:54:59 +00:00
fix: Ensure tool_error is called at least once in tests
This commit is contained in:
parent
fefe6f7424
commit
0a05f7efd7
1 changed files with 4 additions and 6 deletions
|
@ -40,10 +40,9 @@ class TestModels(unittest.TestCase):
|
|||
|
||||
sanity_check_model(mock_io, model)
|
||||
|
||||
mock_io.tool_error.assert_called_once_with(
|
||||
"Model test-model: Environment variables status:"
|
||||
)
|
||||
mock_io.tool_error.assert_called()
|
||||
calls = mock_io.tool_error.call_args_list
|
||||
self.assertIn("Model test-model: Environment variables status:", str(calls))
|
||||
self.assertIn("- API_KEY1: ✓ Set", str(calls))
|
||||
self.assertIn("- API_KEY2: ✓ Set", str(calls))
|
||||
|
||||
|
@ -59,10 +58,9 @@ class TestModels(unittest.TestCase):
|
|||
|
||||
sanity_check_model(mock_io, model)
|
||||
|
||||
mock_io.tool_error.assert_called_once_with(
|
||||
"Model test-model: Environment variables status:"
|
||||
)
|
||||
mock_io.tool_error.assert_called()
|
||||
calls = mock_io.tool_error.call_args_list
|
||||
self.assertIn("Model test-model: Environment variables status:", str(calls))
|
||||
self.assertIn("- API_KEY1: ✗ Not set", str(calls))
|
||||
self.assertIn("- API_KEY2: ✗ Not set", str(calls))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue