mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-12 23:01:41 +00:00
test(faros): proxy admin placeholder user id is not reported as a Faros user
https://claude.ai/code/session_01S79266vJDYzh7ay3nQ9ENW
This commit is contained in:
parent
a547735dd4
commit
a9aa4337a9
1 changed files with 19 additions and 0 deletions
|
|
@ -73,6 +73,25 @@ async def test_user_uid_resolution_priority():
|
|||
]
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_proxy_admin_placeholder_is_not_a_user():
|
||||
from litellm.constants import LITELLM_PROXY_ADMIN_NAME
|
||||
|
||||
logger = make_logger()
|
||||
|
||||
await logger.async_log_success_event(
|
||||
make_kwargs(user_id=LITELLM_PROXY_ADMIN_NAME, end_user="cust"),
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
)
|
||||
await logger.async_log_success_event(
|
||||
make_kwargs(user_id=LITELLM_PROXY_ADMIN_NAME), None, None, None
|
||||
)
|
||||
|
||||
assert [record["user_uid"] for record in logger.log_queue] == ["cust", "unknown"]
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_proxy_admin_placeholder_user_id_is_ignored():
|
||||
logger = make_logger()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue