test(test_rules.py): fix test

This commit is contained in:
Krrish Dholakia 2024-05-11 21:22:37 -07:00
parent a456f6bf2b
commit e8437e52fa

View file

@ -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