mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-12 03:48:56 +00:00
* test: migrate tests/proxy_behavior into integration and unit tiers (partial) * test(integration): run settings-dependent management tests on an owned proxy * test(integration): assert stored values in the rewritten management rows * test(integration): pin sibling team allocations against the org guaranteed throughput cap * test(integration): keep Prisma clients out of the shared integration conftest import path --------- Co-authored-by: yuneng <yuneng@berri.ai>
25 lines
1 KiB
Python
25 lines
1 KiB
Python
"""GET /team/metadata_schema — the behavior actors declares no
|
|
``general_settings.team_metadata_schema``, so the route is an info route that
|
|
returns an empty field list to every authenticated actor and 401s without a key.
|
|
"""
|
|
|
|
import pytest
|
|
|
|
from tests.integration._support.actors import Actor
|
|
|
|
pytestmark = pytest.mark.asyncio(loop_scope="session")
|
|
|
|
|
|
@pytest.mark.parametrize("actor", list(Actor), ids=[a.value for a in Actor])
|
|
async def test_team_metadata_schema_default_is_empty(actor: Actor, gateway_client, actors):
|
|
resp = await gateway_client.get(
|
|
"/team/metadata_schema",
|
|
headers={"Authorization": f"Bearer {actors.keys[actor].cleartext}"},
|
|
)
|
|
assert resp.status_code == 200, f"{actor.value}: {resp.status_code} {resp.text}"
|
|
assert resp.json() == {"fields": []}
|
|
|
|
|
|
async def test_team_metadata_schema_requires_auth(gateway_client, actors):
|
|
resp = await gateway_client.get("/team/metadata_schema", headers={"Authorization": "Bearer invalid"})
|
|
assert resp.status_code == 401, resp.text
|