mirror of
https://github.com/django/django.git
synced 2025-11-23 12:26:57 +00:00
Refs #35402 -- Added tests for invalid usage of submodules in some settings.
This commit is contained in:
parent
602fe961e6
commit
b99c608ea1
2 changed files with 17 additions and 1 deletions
|
|
@ -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"]
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue