summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2014-12-15 09:47:23 -0500
committerTim Graham <timograham@gmail.com>2014-12-15 10:09:18 -0500
commit0d5ca7b560dbb827eea625e53e4a6a67c29d7964 (patch)
tree576498d72d21b20d78a2d70a82c933de9151172a
parent9aeb917dad2c3d4c2830f38d3bfc63699e0ba837 (diff)
Moved an import in an auth test; refs #23925.
This keeps tests/__init__.py from importing other modules and may fix a problem with test discovery revealed in formtools tests on Travis CI.
-rw-r--r--django/contrib/auth/tests/__init__.py3
-rw-r--r--django/contrib/auth/tests/backend_alias.py2
-rw-r--r--django/contrib/auth/tests/test_auth_backends.py2
3 files changed, 3 insertions, 4 deletions
diff --git a/django/contrib/auth/tests/__init__.py b/django/contrib/auth/tests/__init__.py
index bf9af5db45..2c308642e5 100644
--- a/django/contrib/auth/tests/__init__.py
+++ b/django/contrib/auth/tests/__init__.py
@@ -1,4 +1 @@
# The password for the fixture data users is 'password'
-
-# For testing that auth backends can be referenced using a convenience import
-from django.contrib.auth.tests.test_auth_backends import ImportedModelBackend # NOQA
diff --git a/django/contrib/auth/tests/backend_alias.py b/django/contrib/auth/tests/backend_alias.py
new file mode 100644
index 0000000000..1f31f7a16a
--- /dev/null
+++ b/django/contrib/auth/tests/backend_alias.py
@@ -0,0 +1,2 @@
+# For testing that auth backends can be referenced using a convenience import
+from django.contrib.auth.tests.test_auth_backends import ImportedModelBackend # NOQA
diff --git a/django/contrib/auth/tests/test_auth_backends.py b/django/contrib/auth/tests/test_auth_backends.py
index 65d9fde8f8..d3b6c5de0c 100644
--- a/django/contrib/auth/tests/test_auth_backends.py
+++ b/django/contrib/auth/tests/test_auth_backends.py
@@ -620,7 +620,7 @@ class ImportedBackendTests(TestCase):
as the one defined in AUTHENTICATION_BACKENDS setting.
"""
- backend = 'django.contrib.auth.tests.ImportedModelBackend'
+ backend = 'django.contrib.auth.tests.backend_alias.ImportedModelBackend'
@override_settings(AUTHENTICATION_BACKENDS=(backend, ))
def test_backend_path(self):