mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-26 06:03:19 +00:00
test: assert the BYOK move path returns clean in both gate files (test-quality TQ001)
Generated-by: termag
This commit is contained in:
parent
d3cd114082
commit
c4a0740885
2 changed files with 8 additions and 2 deletions
|
|
@ -51,7 +51,9 @@ async def test_team_admin_bring_your_own_key_move_allowed():
|
|||
with (
|
||||
patch.object(mme, "effective_server_owned_wif_fields", AsyncMock(return_value=())),
|
||||
):
|
||||
await ModelManagementAuthChecks._reject_non_admin_wif_write(
|
||||
# The observable on a BYOK move is that the server-owned-credential
|
||||
# guard raised nothing for this caller.
|
||||
no_raise = await ModelManagementAuthChecks._reject_non_admin_wif_write(
|
||||
model_params=model_params,
|
||||
incoming_params=incoming.model_dump(exclude_none=True),
|
||||
user_api_key_dict=UserAPIKeyAuth(
|
||||
|
|
@ -61,6 +63,7 @@ async def test_team_admin_bring_your_own_key_move_allowed():
|
|||
),
|
||||
prisma_client=AsyncMock(),
|
||||
)
|
||||
assert no_raise is None
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
|
|
|||
|
|
@ -50,7 +50,9 @@ async def test_team_admin_bring_your_own_key_move_allowed():
|
|||
with (
|
||||
patch.object(mme, "effective_server_owned_wif_fields", AsyncMock(return_value=())),
|
||||
):
|
||||
await ModelManagementAuthChecks._reject_non_admin_wif_write(
|
||||
# The observable on a BYOK move is that the server-owned-credential
|
||||
# guard raised nothing for this caller.
|
||||
no_raise = await ModelManagementAuthChecks._reject_non_admin_wif_write(
|
||||
model_params=model_params,
|
||||
incoming_params=incoming.model_dump(exclude_none=True),
|
||||
user_api_key_dict=UserAPIKeyAuth(
|
||||
|
|
@ -60,6 +62,7 @@ async def test_team_admin_bring_your_own_key_move_allowed():
|
|||
),
|
||||
prisma_client=AsyncMock(),
|
||||
)
|
||||
assert no_raise is None
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue