ruff check fix

This commit is contained in:
Daulet Amirkhanov 2025-09-03 14:21:18 +01:00
parent 258aab42b5
commit 057c84fdc5
2 changed files with 7 additions and 7 deletions

View file

@ -156,7 +156,7 @@ class TestConditionalAuthenticationBehavior:
error_detail = response.json().get("detail", "") error_detail = response.json().get("detail", "")
assert "authenticate" not in error_detail.lower() assert "authenticate" not in error_detail.lower()
assert "unauthorized" not in error_detail.lower() assert "unauthorized" not in error_detail.lower()
except: except Exception:
pass # If response is not JSON, that's fine pass # If response is not JSON, that's fine
@patch("cognee.modules.settings.get_settings.get_vectordb_config") @patch("cognee.modules.settings.get_settings.get_vectordb_config")
@ -229,4 +229,4 @@ class TestConditionalAuthenticationErrorHandling:
assert isinstance(REQUIRE_AUTHENTICATION, bool) assert isinstance(REQUIRE_AUTHENTICATION, bool)
# In default environment, should be False # In default environment, should be False
assert REQUIRE_AUTHENTICATION == False assert not REQUIRE_AUTHENTICATION

View file

@ -126,7 +126,7 @@ class TestConditionalAuthenticationIntegration:
assert isinstance(REQUIRE_AUTHENTICATION, bool) assert isinstance(REQUIRE_AUTHENTICATION, bool)
# Currently should be False (optional authentication) # Currently should be False (optional authentication)
assert REQUIRE_AUTHENTICATION == False assert not REQUIRE_AUTHENTICATION
class TestConditionalAuthenticationEnvironmentVariables: class TestConditionalAuthenticationEnvironmentVariables:
@ -145,7 +145,7 @@ class TestConditionalAuthenticationEnvironmentVariables:
REQUIRE_AUTHENTICATION, REQUIRE_AUTHENTICATION,
) )
assert REQUIRE_AUTHENTICATION == False assert not REQUIRE_AUTHENTICATION
def test_require_authentication_true(self): def test_require_authentication_true(self):
"""Test that REQUIRE_AUTHENTICATION=true is parsed correctly when imported.""" """Test that REQUIRE_AUTHENTICATION=true is parsed correctly when imported."""
@ -160,7 +160,7 @@ class TestConditionalAuthenticationEnvironmentVariables:
REQUIRE_AUTHENTICATION, REQUIRE_AUTHENTICATION,
) )
assert REQUIRE_AUTHENTICATION == True assert REQUIRE_AUTHENTICATION
def test_require_authentication_false_explicit(self): def test_require_authentication_false_explicit(self):
"""Test that REQUIRE_AUTHENTICATION=false is parsed correctly when imported.""" """Test that REQUIRE_AUTHENTICATION=false is parsed correctly when imported."""
@ -175,7 +175,7 @@ class TestConditionalAuthenticationEnvironmentVariables:
REQUIRE_AUTHENTICATION, REQUIRE_AUTHENTICATION,
) )
assert REQUIRE_AUTHENTICATION == False assert not REQUIRE_AUTHENTICATION
def test_require_authentication_case_insensitive(self): def test_require_authentication_case_insensitive(self):
"""Test that environment variable parsing is case insensitive when imported.""" """Test that environment variable parsing is case insensitive when imported."""
@ -204,7 +204,7 @@ class TestConditionalAuthenticationEnvironmentVariables:
# The module-level variable should currently be False (set at import time) # The module-level variable should currently be False (set at import time)
assert isinstance(REQUIRE_AUTHENTICATION, bool) assert isinstance(REQUIRE_AUTHENTICATION, bool)
assert REQUIRE_AUTHENTICATION == False assert not REQUIRE_AUTHENTICATION
class TestConditionalAuthenticationEdgeCases: class TestConditionalAuthenticationEdgeCases: