summaryrefslogtreecommitdiff
path: root/tests/auth_tests/test_auth_backends.py
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2016-02-04 11:47:51 -0500
committerSimon Charette <charette.s@gmail.com>2016-02-04 12:30:34 -0500
commit6eb3ce11e4d6be237ad2e4895d8ae0b7bc1803dc (patch)
tree0b14e1f387c7009cb89fcf905722805bc43392f2 /tests/auth_tests/test_auth_backends.py
parent19318507d92d35f5f5cee6bfb7c379efa309c4f8 (diff)
Fixed #26089 -- Removed custom user test models from public API.
Thanks to Tim Graham for the review.
Diffstat (limited to 'tests/auth_tests/test_auth_backends.py')
-rw-r--r--tests/auth_tests/test_auth_backends.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/auth_tests/test_auth_backends.py b/tests/auth_tests/test_auth_backends.py
index 54a863bcda..2f28c6cdf1 100644
--- a/tests/auth_tests/test_auth_backends.py
+++ b/tests/auth_tests/test_auth_backends.py
@@ -8,7 +8,6 @@ from django.contrib.auth import (
from django.contrib.auth.backends import ModelBackend
from django.contrib.auth.hashers import MD5PasswordHasher
from django.contrib.auth.models import AnonymousUser, Group, Permission, User
-from django.contrib.auth.tests.custom_user import CustomUser, ExtensionUser
from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import ImproperlyConfigured, PermissionDenied
from django.http import HttpRequest
@@ -16,7 +15,7 @@ from django.test import (
SimpleTestCase, TestCase, modify_settings, override_settings,
)
-from .models import CustomPermissionsUser, UUIDUser
+from .models import CustomPermissionsUser, CustomUser, ExtensionUser, UUIDUser
class CountingMD5PasswordHasher(MD5PasswordHasher):
@@ -215,7 +214,7 @@ class ModelBackendTest(BaseModelBackendTest, TestCase):
)
-@override_settings(AUTH_USER_MODEL='auth.ExtensionUser')
+@override_settings(AUTH_USER_MODEL='auth_tests.ExtensionUser')
class ExtensionUserModelBackendTest(BaseModelBackendTest, TestCase):
"""
Tests for the ModelBackend using the custom ExtensionUser model.
@@ -275,7 +274,7 @@ class CustomPermissionsUserModelBackendTest(BaseModelBackendTest, TestCase):
)
-@override_settings(AUTH_USER_MODEL='auth.CustomUser')
+@override_settings(AUTH_USER_MODEL='auth_tests.CustomUser')
class CustomUserModelBackendAuthenticateTest(TestCase):
"""
Tests that the model backend can accept a credentials kwarg labeled with