mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
fix: Handle NotFoundError in send chat test with single print call
This commit is contained in:
parent
7a8399571a
commit
9dd7b795ca
1 changed files with 2 additions and 2 deletions
|
@ -84,10 +84,10 @@ class TestSendChat(unittest.TestCase):
|
|||
mock = MagicMock()
|
||||
mock.status_code = 400
|
||||
|
||||
mock_completion.side_effect = litellm.InvalidRequestError(
|
||||
mock_completion.side_effect = litellm.NotFoundError(
|
||||
message="Invalid request", llm_provider="test_provider", model="test_model"
|
||||
)
|
||||
|
||||
result = simple_send_with_retries(self.mock_model, self.mock_messages)
|
||||
assert result is None
|
||||
assert mock_print.call_count == 2 # Error message and description
|
||||
assert mock_print.call_count == 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue