summaryrefslogtreecommitdiff
path: root/tests/auth_tests/test_models.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auth_tests/test_models.py')
-rw-r--r--tests/auth_tests/test_models.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auth_tests/test_models.py b/tests/auth_tests/test_models.py
index 34f411f2f9..983424843c 100644
--- a/tests/auth_tests/test_models.py
+++ b/tests/auth_tests/test_models.py
@@ -433,6 +433,13 @@ class UserWithPermTestCase(TestCase):
backend="invalid.backend.CustomModelBackend",
)
+ def test_invalid_backend_submodule(self):
+ with self.assertRaises(ImportError):
+ User.objects.with_perm(
+ "auth.test",
+ backend="json.tool",
+ )
+
@override_settings(
AUTHENTICATION_BACKENDS=["auth_tests.test_models.CustomModelBackend"]
)