mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-12 03:48:56 +00:00
test(keys): assert accepted project assignment flows into update payload
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
22c9113987
commit
2858a74f38
1 changed files with 5 additions and 1 deletions
|
|
@ -19697,13 +19697,17 @@ async def test_project_assignment_to_unassigned_key_on_same_team():
|
|||
token="project-assign-token", project_id=None, team_id="team-lit-5823", models=["model-orbit"]
|
||||
)
|
||||
cache: Final = await _cache_with_project("project-orbit", ["model-orbit"])
|
||||
data: Final = UpdateKeyRequest(key=existing.token, project_id="project-orbit")
|
||||
|
||||
await _validate_update_key_data(
|
||||
UpdateKeyRequest(key=existing.token, project_id="project-orbit"), existing,
|
||||
data, existing,
|
||||
UserAPIKeyAuth(user_role=LitellmUserRoles.PROXY_ADMIN),
|
||||
None, False, _project_assignment_prisma(), cache,
|
||||
)
|
||||
|
||||
update: Final = await prepare_key_update_data(data=data, existing_key_row=existing)
|
||||
assert update["project_id"] == "project-orbit"
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_project_assignment_rejects_project_on_another_team():
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue