test: assert the BYOK move path returns clean in both gate files (test-quality TQ001)

Generated-by: termag
This commit is contained in:
Jack Danger 2026-10-18 09:58:24 +00:00
parent d3cd114082
commit c4a0740885
2 changed files with 8 additions and 2 deletions

View file

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

View file

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