diff --git a/src/backend/core/authentication/__init__.py b/src/backend/core/authentication/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/backend/core/authentication.py b/src/backend/core/authentication/backends.py similarity index 97% rename from src/backend/core/authentication.py rename to src/backend/core/authentication/backends.py index 2a45d9f..a4d52c0 100644 --- a/src/backend/core/authentication.py +++ b/src/backend/core/authentication/backends.py @@ -1,4 +1,4 @@ -"""Authentication for the People core app.""" +"""Authentication Backends for the People core app.""" from django.conf import settings from django.core.exceptions import SuspiciousOperation @@ -10,7 +10,7 @@ from mozilla_django_oidc.auth import ( OIDCAuthenticationBackend as MozillaOIDCAuthenticationBackend, ) -from .models import Identity +from core.models import Identity class OIDCAuthenticationBackend(MozillaOIDCAuthenticationBackend): diff --git a/src/backend/core/tests/authentication/__init__.py b/src/backend/core/tests/authentication/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/backend/core/tests/test_authentication_get_or_create_user.py b/src/backend/core/tests/authentication/test_backends.py similarity index 98% rename from src/backend/core/tests/test_authentication_get_or_create_user.py rename to src/backend/core/tests/authentication/test_backends.py index 6bb4974..c0c5dd5 100644 --- a/src/backend/core/tests/test_authentication_get_or_create_user.py +++ b/src/backend/core/tests/authentication/test_backends.py @@ -1,11 +1,11 @@ -"""Unit tests for the `get_or_create_user` function.""" +"""Unit tests for the Authentication Backends.""" from django.core.exceptions import SuspiciousOperation import pytest from core import models -from core.authentication import OIDCAuthenticationBackend +from core.authentication.backends import OIDCAuthenticationBackend from core.factories import IdentityFactory pytestmark = pytest.mark.django_db diff --git a/src/backend/people/settings.py b/src/backend/people/settings.py index c4175e2..ec0d22b 100755 --- a/src/backend/people/settings.py +++ b/src/backend/people/settings.py @@ -182,7 +182,7 @@ class Base(Configuration): AUTHENTICATION_BACKENDS = [ "django.contrib.auth.backends.ModelBackend", - "core.authentication.OIDCAuthenticationBackend", + "core.authentication.backends.OIDCAuthenticationBackend", ] # Django's applications from the highest priority to the lowest