mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-29 14:21:40 +00:00
test(test_rules.py): fix test
This commit is contained in:
@@ -132,12 +132,15 @@ def test_post_call_rule_streaming():
|
||||
)
|
||||
|
||||
|
||||
def test_post_call_processing_error_async_response():
|
||||
response = asyncio.run(
|
||||
acompletion(
|
||||
@pytest.mark.asyncio
|
||||
async def test_post_call_processing_error_async_response():
|
||||
try:
|
||||
response = await acompletion(
|
||||
model="command-nightly", # Just used as an example
|
||||
messages=[{"content": "Hello, how are you?", "role": "user"}],
|
||||
api_base="https://openai-proxy.berriai.repl.co", # Just used as an example
|
||||
custom_llm_provider="openai",
|
||||
)
|
||||
)
|
||||
pytest.fail("This call should have failed")
|
||||
except Exception as e:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user