diff options
| author | mariatta <mariatta.wijaya@gmail.com> | 2026-04-03 11:44:02 -0700 |
|---|---|---|
| committer | Jacob Walls <jacobtylerwalls@gmail.com> | 2026-04-07 15:38:35 -0400 |
| commit | e2abe321a6f1370e05c1a89a742125c9eafcac8c (patch) | |
| tree | 85bd11175bfa5e3e3cc9e7ccbb9c3af31cc37f4e /tests | |
| parent | 74e73dc1315d696330621a7f08310a2e87ea0eba (diff) | |
Fixed #37021 -- Added Permission.user_perm_str property.
For use in checking user permissions via has_perm().
Co-authored-by: 사재혁 <jaehyuck.sa.dev@gmail.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/auth_tests/test_models.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auth_tests/test_models.py b/tests/auth_tests/test_models.py index a3e7a3205b..fd99b970d7 100644 --- a/tests/auth_tests/test_models.py +++ b/tests/auth_tests/test_models.py @@ -635,3 +635,7 @@ class PermissionTests(TestCase): self.assertEqual( str(p), "Auth_Tests | custom email field | Can view custom email field" ) + + def test_user_perm_str(self): + p = Permission.objects.get(codename="view_customemailfield") + self.assertEqual(p.user_perm_str, "auth_tests.view_customemailfield") |
