mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-23 12:24:08 +00:00
test(test_completion.py): fix testing to retry
This commit is contained in:
@@ -97,6 +97,8 @@ def test_null_role_response():
|
||||
"""
|
||||
import openai
|
||||
|
||||
litellm.success_callback = ["lunary"]
|
||||
|
||||
openai_client = openai.OpenAI()
|
||||
with patch.object(
|
||||
openai_client.chat.completions, "create", side_effect=_openai_mock_response
|
||||
@@ -112,6 +114,8 @@ def test_null_role_response():
|
||||
|
||||
assert response.choices[0].message.role == "assistant"
|
||||
|
||||
assert False
|
||||
|
||||
|
||||
def test_completion_azure_command_r():
|
||||
try:
|
||||
@@ -409,6 +413,7 @@ async def test_anthropic_no_content_error():
|
||||
def test_gemini_completion_call_error():
|
||||
try:
|
||||
print("test completion + streaming")
|
||||
litellm.num_retries = 3
|
||||
litellm.set_verbose = True
|
||||
messages = [{"role": "user", "content": "what is the capital of congo?"}]
|
||||
response = completion(
|
||||
|
||||
Reference in New Issue
Block a user