1
0
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:
Jacob Walls
2024-06-09 12:18:26 -04:00
committed by Sarah Boyce
parent 602fe961e6
commit b99c608ea1
2 changed files with 17 additions and 1 deletions

View File

@@ -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"]
)