From 5403c5828c84ba187d9b0fdf829993b763d5ceb3 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Sat, 28 Sep 2024 13:15:19 -0700 Subject: [PATCH] refactor(test_proxy_utils.py): place at root level test folder --- .../proxy_util_tests}/test_proxy_utils.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) rename {litellm/tests => tests/proxy_util_tests}/test_proxy_utils.py (98%) diff --git a/litellm/tests/test_proxy_utils.py b/tests/proxy_util_tests/test_proxy_utils.py similarity index 98% rename from litellm/tests/test_proxy_utils.py rename to tests/proxy_util_tests/test_proxy_utils.py index 43c0de51f..dc9de5d44 100644 --- a/litellm/tests/test_proxy_utils.py +++ b/tests/proxy_util_tests/test_proxy_utils.py @@ -6,11 +6,12 @@ from unittest.mock import Mock import pytest from fastapi import Request -import litellm - sys.path.insert( 0, os.path.abspath("../..") ) # Adds the parent directory to the system path +import litellm + + from litellm.proxy._types import LitellmUserRoles, UserAPIKeyAuth from litellm.proxy.auth.auth_utils import is_request_body_safe from litellm.proxy.litellm_pre_call_utils import ( @@ -367,3 +368,12 @@ def test_is_request_body_safe_model_enabled( error_raised = True assert expect_error == error_raised + + +def test_get_remaining_rate_limit(): + """ + Ensure accurate remaining rate limit is returned to the client. + + Relevant Issue: https://github.com/BerriAI/litellm/issues/5957 + """ + pass