mirror of
https://github.com/django/django.git
synced 2025-10-30 00:56:09 +00:00
Refs #35402 -- Added tests for invalid usage of submodules in some settings.
This commit is contained in:
@@ -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"]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user