diff --git a/src/backend/core/authentication/__init__.py b/src/backend/core/authentication/__init__.py new file mode 100644 index 00000000..e69de29b 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 a317e670..bfa2c107 100644 --- a/src/backend/core/authentication.py +++ b/src/backend/core/authentication/backends.py @@ -1,4 +1,4 @@ -"""Authentication for the Impress core app.""" +"""Authentication Backends for the Impress core app.""" from django.core.exceptions import SuspiciousOperation from django.utils.translation import gettext_lazy as _ @@ -8,7 +8,7 @@ from mozilla_django_oidc.auth import ( OIDCAuthenticationBackend as MozillaOIDCAuthenticationBackend, ) -from .models import User +from core.models import User 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 00000000..e69de29b 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 96% rename from src/backend/core/tests/test_authentication_get_or_create_user.py rename to src/backend/core/tests/authentication/test_backends.py index 83c44612..c18635f2 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 UserFactory pytestmark = pytest.mark.django_db diff --git a/src/backend/impress/settings.py b/src/backend/impress/settings.py index d3b2eb28..19f3966e 100755 --- a/src/backend/impress/settings.py +++ b/src/backend/impress/settings.py @@ -206,7 +206,7 @@ class Base(Configuration): AUTHENTICATION_BACKENDS = [ "django.contrib.auth.backends.ModelBackend", - "core.authentication.OIDCAuthenticationBackend", + "core.authentication.backends.OIDCAuthenticationBackend", ] # Django applications from the highest priority to the lowest