mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
fix: add missing patch test assertions for database_failure and no_prisma_client scenarios
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
8d4b5ed571
commit
69f5784875
1 changed files with 4 additions and 0 deletions
|
|
@ -951,6 +951,10 @@ async def test_patch_guardrail_endpoint(
|
|||
assert mock_guardrail_registry.update_guardrail_in_db.call_count == 2
|
||||
# Verify rollback attempted in-memory re-sync with old config
|
||||
assert mock_in_memory_handler.sync_guardrail_from_db.call_count == 2
|
||||
elif scenario == "database_failure":
|
||||
assert "Database error" in str(exc_info.value.detail)
|
||||
elif scenario == "no_prisma_client":
|
||||
assert "Prisma client not initialized" in str(exc_info.value.detail)
|
||||
else:
|
||||
result = await patch_guardrail(
|
||||
"test-guardrail-id", MOCK_PATCH_REQUEST, user_api_key_dict=MOCK_ADMIN_USER
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue