diff options
| author | Jacob Walls <jacobtylerwalls@gmail.com> | 2024-06-09 12:18:26 -0400 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2024-08-13 16:09:52 +0200 |
| commit | b99c608ea10cabc97a6b251cdb6e81ef2a83bdcf (patch) | |
| tree | 4976763241879e6f05f4e1bdb5b8ea28c05c3d1b /tests/auth_tests/test_models.py | |
| parent | 602fe961e6834d665f2359087a1272e9f9806b71 (diff) | |
Refs #35402 -- Added tests for invalid usage of submodules in some settings.
Diffstat (limited to 'tests/auth_tests/test_models.py')
| -rw-r--r-- | tests/auth_tests/test_models.py | 7 |
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"] ) |
