mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 19:24:27 +00:00
test(test_rules.py): fix test
This commit is contained in:
parent
a456f6bf2b
commit
e8437e52fa
1 changed files with 7 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue