mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
test(test_auth_utils.py): ensure get end user id from request body always returns a string
This commit is contained in:
parent
c89995ff7a
commit
ca9f7ceed6
1 changed files with 9 additions and 0 deletions
|
|
@ -68,3 +68,12 @@ def test_configurable_clientside_parameters(
|
|||
)
|
||||
print(resp)
|
||||
assert resp == should_return_true
|
||||
|
||||
|
||||
def test_get_end_user_id_from_request_body_always_returns_str():
|
||||
from litellm.proxy.auth.auth_utils import get_end_user_id_from_request_body
|
||||
|
||||
request_body = {"user": 123}
|
||||
end_user_id = get_end_user_id_from_request_body(request_body)
|
||||
assert end_user_id == "123"
|
||||
assert isinstance(end_user_id, str)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue