mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 10:14:59 +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("litellm.completion")
|
||||||
@patch("builtins.print")
|
@patch("builtins.print")
|
||||||
def test_send_with_retries_rate_limit_error(self, mock_print, mock_completion):
|
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
|
# Set up the mock to raise
|
||||||
mock_completion.side_effect = [
|
mock_completion.side_effect = [
|
||||||
openai.RateLimitError(
|
openai.RateLimitError(
|
||||||
"rate limit exceeded",
|
"rate limit exceeded",
|
||||||
response=MagicMock(),
|
response=mock,
|
||||||
body=None,
|
body=None,
|
||||||
),
|
),
|
||||||
None,
|
None,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue