mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-12 08:42:18 +00:00
test(responses): keep exception assertions to one call
This commit is contained in:
parent
2b34af521c
commit
a6ca967105
1 changed files with 4 additions and 3 deletions
|
|
@ -279,8 +279,8 @@ async def test_unknown_previous_response_fails_before_sending_a_contextless_comp
|
|||
async_client: Final = AsyncHTTPHandler(transport=transport)
|
||||
with httpx.Client(transport=transport) as sync_client:
|
||||
try:
|
||||
with pytest.raises(litellm.BadRequestError, match="previous_response_id") as raised:
|
||||
if async_call:
|
||||
if async_call:
|
||||
with pytest.raises(litellm.BadRequestError, match="previous_response_id") as raised:
|
||||
await litellm.aresponses(
|
||||
model="hosted_vllm/test-model",
|
||||
input="What is my favorite color?",
|
||||
|
|
@ -292,7 +292,8 @@ async def test_unknown_previous_response_fails_before_sending_a_contextless_comp
|
|||
api_base="https://provider.invalid/v1",
|
||||
num_retries=0,
|
||||
)
|
||||
else:
|
||||
else:
|
||||
with pytest.raises(litellm.BadRequestError, match="previous_response_id") as raised:
|
||||
litellm.responses(
|
||||
model="hosted_vllm/test-model",
|
||||
input="What is my favorite color?",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue