From 13aa7f75f6dff49a036a71c5db012a68d8338752 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Tue, 1 Apr 2025 07:40:31 -0700 Subject: [PATCH] test_enforced_params_check --- tests/proxy_unit_tests/test_proxy_utils.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/proxy_unit_tests/test_proxy_utils.py b/tests/proxy_unit_tests/test_proxy_utils.py index d613118fc89..9fb00c094fe 100644 --- a/tests/proxy_unit_tests/test_proxy_utils.py +++ b/tests/proxy_unit_tests/test_proxy_utils.py @@ -822,6 +822,17 @@ def test_get_enforced_params( api_key="test_api_key", user_id="test_user_id", org_id="test_org_id" ), {}, + False, + ), + ( + {"service_account_settings": {"enforced_params": ["user"]}}, + UserAPIKeyAuth( + api_key="test_api_key", + user_id="test_user_id", + org_id="test_org_id", + metadata={"service_account_id": "test_service_account_id"} + ), + {}, True, ), ( @@ -854,6 +865,7 @@ def test_get_enforced_params( {"service_account_settings": {"enforced_params": ["user"]}}, UserAPIKeyAuth( api_key="test_api_key", + metadata={"service_account_id": "test_service_account_id"} ), {"user": "test_user"}, False,