From aa1251b370f60fb2f48b27023f5a01336ff802b6 Mon Sep 17 00:00:00 2001 From: Daulet Amirkhanov Date: Wed, 3 Sep 2025 13:53:56 +0100 Subject: [PATCH] chore: clean up imports --- .../unit/api/test_conditional_authentication_endpoints.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cognee/tests/unit/api/test_conditional_authentication_endpoints.py b/cognee/tests/unit/api/test_conditional_authentication_endpoints.py index c0553284c..c066b9fa9 100644 --- a/cognee/tests/unit/api/test_conditional_authentication_endpoints.py +++ b/cognee/tests/unit/api/test_conditional_authentication_endpoints.py @@ -1,6 +1,4 @@ -import os import pytest -import pytest_asyncio from unittest.mock import patch, AsyncMock, MagicMock from uuid import uuid4 from fastapi.testclient import TestClient @@ -52,7 +50,10 @@ class TestConditionalAuthenticationEndpoints: assert response.status_code == 200 assert response.json() == {"message": "Hello, World, I am alive!"} - @patch.dict(os.environ, {"REQUIRE_AUTHENTICATION": "false"}) + @patch( + "cognee.modules.users.methods.get_authenticated_user.REQUIRE_AUTHENTICATION", + False, + ) def test_openapi_schema_no_global_security(self, client): """Test that OpenAPI schema doesn't require global authentication.""" response = client.get("/openapi.json")