chore: clean up imports

This commit is contained in:
Daulet Amirkhanov 2025-09-03 13:53:56 +01:00
parent f0e8f8cc47
commit aa1251b370

View file

@ -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")