mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-12 23:01:41 +00:00
test(proxy): patch utils.get_server_root_path in passthrough auth tests
After removing get_server_root_path from pass_through_endpoints, route and JWT tests must mock litellm.proxy.utils where normalization reads it. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
3d00874438
commit
bde16ff5b7
2 changed files with 8 additions and 8 deletions
|
|
@ -233,7 +233,7 @@ async def test_find_team_with_model_access_uses_request_method_for_passthrough_a
|
|||
mock_registered_routes,
|
||||
),
|
||||
patch(
|
||||
"litellm.proxy.pass_through_endpoints.pass_through_endpoints.get_server_root_path",
|
||||
"litellm.proxy.utils.get_server_root_path",
|
||||
return_value="/",
|
||||
),
|
||||
):
|
||||
|
|
|
|||
|
|
@ -733,7 +733,7 @@ def test_virtual_key_llm_api_routes_allows_registered_pass_through_endpoints():
|
|||
mock_registered_routes,
|
||||
),
|
||||
patch(
|
||||
"litellm.proxy.pass_through_endpoints.pass_through_endpoints.get_server_root_path",
|
||||
"litellm.proxy.utils.get_server_root_path",
|
||||
return_value="/",
|
||||
),
|
||||
):
|
||||
|
|
@ -799,7 +799,7 @@ def test_virtual_key_llm_api_routes_allows_non_auth_enforced_pass_through_endpoi
|
|||
mock_registered_routes,
|
||||
),
|
||||
patch(
|
||||
"litellm.proxy.pass_through_endpoints.pass_through_endpoints.get_server_root_path",
|
||||
"litellm.proxy.utils.get_server_root_path",
|
||||
return_value="/",
|
||||
),
|
||||
):
|
||||
|
|
@ -849,7 +849,7 @@ def test_virtual_key_llm_api_routes_denies_auth_pass_through_without_allowlist()
|
|||
mock_registered_routes,
|
||||
),
|
||||
patch(
|
||||
"litellm.proxy.pass_through_endpoints.pass_through_endpoints.get_server_root_path",
|
||||
"litellm.proxy.utils.get_server_root_path",
|
||||
return_value="/",
|
||||
),
|
||||
):
|
||||
|
|
@ -893,7 +893,7 @@ def test_virtual_key_llm_api_routes_uses_method_specific_auth_setting():
|
|||
mock_registered_routes,
|
||||
),
|
||||
patch(
|
||||
"litellm.proxy.pass_through_endpoints.pass_through_endpoints.get_server_root_path",
|
||||
"litellm.proxy.utils.get_server_root_path",
|
||||
return_value="/",
|
||||
),
|
||||
):
|
||||
|
|
@ -948,7 +948,7 @@ def test_non_proxy_admin_denies_auth_pass_through_without_allowlist():
|
|||
mock_registered_routes,
|
||||
),
|
||||
patch(
|
||||
"litellm.proxy.pass_through_endpoints.pass_through_endpoints.get_server_root_path",
|
||||
"litellm.proxy.utils.get_server_root_path",
|
||||
return_value="/",
|
||||
),
|
||||
):
|
||||
|
|
@ -987,7 +987,7 @@ def test_non_proxy_admin_allows_auth_pass_through_with_team_allowlist():
|
|||
mock_registered_routes,
|
||||
),
|
||||
patch(
|
||||
"litellm.proxy.pass_through_endpoints.pass_through_endpoints.get_server_root_path",
|
||||
"litellm.proxy.utils.get_server_root_path",
|
||||
return_value="/",
|
||||
),
|
||||
):
|
||||
|
|
@ -1021,7 +1021,7 @@ def test_virtual_key_without_llm_api_routes_cannot_access_pass_through():
|
|||
mock_registered_routes,
|
||||
),
|
||||
patch(
|
||||
"litellm.proxy.pass_through_endpoints.pass_through_endpoints.get_server_root_path",
|
||||
"litellm.proxy.utils.get_server_root_path",
|
||||
return_value="/",
|
||||
),
|
||||
):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue