mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
fixed sendchat test
This commit is contained in:
parent
6f8c1cf780
commit
a0649ba5fa
1 changed files with 4 additions and 1 deletions
|
@ -15,11 +15,14 @@ class TestSendChat(unittest.TestCase):
|
|||
@patch("litellm.completion")
|
||||
@patch("builtins.print")
|
||||
def test_send_with_retries_rate_limit_error(self, mock_print, mock_completion):
|
||||
mock = MagicMock()
|
||||
mock.status_code = 500
|
||||
|
||||
# Set up the mock to raise
|
||||
mock_completion.side_effect = [
|
||||
openai.RateLimitError(
|
||||
"rate limit exceeded",
|
||||
response=MagicMock(),
|
||||
response=mock,
|
||||
body=None,
|
||||
),
|
||||
None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue