diff --git a/tests/test_litellm/proxy/auth/test_cli_session_registry.py b/tests/test_litellm/proxy/auth/test_cli_session_registry.py index 367fe1124be..844fd0cdbde 100644 --- a/tests/test_litellm/proxy/auth/test_cli_session_registry.py +++ b/tests/test_litellm/proxy/auth/test_cli_session_registry.py @@ -1,14 +1,10 @@ import json -import os -import sys import time from datetime import datetime, timedelta, timezone import pytest from prisma.engine.errors import EngineConnectionError -sys.path.insert(0, os.path.abspath("../..")) - from litellm.caching.dual_cache import DualCache from litellm.caching.in_memory_cache import InMemoryCache from litellm.constants import DEFAULT_IN_MEMORY_TTL @@ -316,9 +312,7 @@ async def test_db_outage_follows_the_proxy_wide_posture(monkeypatch): monkeypatch.setattr(proxy_server, "general_settings", {"allow_requests_on_db_unavailable": True}, raising=False) assert ( - await is_cli_session_revoked( - session_token=SESSION_TOKEN, prisma_client=prisma, user_api_key_cache=_cache() - ) + await is_cli_session_revoked(session_token=SESSION_TOKEN, prisma_client=prisma, user_api_key_cache=_cache()) is False ) diff --git a/tests/test_litellm/proxy/management_endpoints/test_cli_session_endpoints.py b/tests/test_litellm/proxy/management_endpoints/test_cli_session_endpoints.py index 5d4813c4eb4..9e972abd2bf 100644 --- a/tests/test_litellm/proxy/management_endpoints/test_cli_session_endpoints.py +++ b/tests/test_litellm/proxy/management_endpoints/test_cli_session_endpoints.py @@ -1,13 +1,9 @@ -import os -import sys from datetime import datetime, timedelta, timezone from unittest.mock import patch import pytest from fastapi import HTTPException -sys.path.insert(0, os.path.abspath("../../../")) - from litellm.caching.dual_cache import DualCache from litellm.proxy._types import LitellmUserRoles, UserAPIKeyAuth from litellm.proxy.management_endpoints.cli_session_endpoints import ( @@ -109,6 +105,8 @@ async def test_revoking_an_unknown_session_is_a_404(): with prisma_patch, cache_patch: with pytest.raises(HTTPException) as exc_info: - await revoke_cli_session_endpoint(session_id="nope", user_api_key_dict=_caller(LitellmUserRoles.PROXY_ADMIN)) + await revoke_cli_session_endpoint( + session_id="nope", user_api_key_dict=_caller(LitellmUserRoles.PROXY_ADMIN) + ) assert exc_info.value.status_code == 404