diff options
author | Tim Graham <timograham@gmail.com> | 2018-12-21 12:10:47 -0500 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2018-12-21 12:45:02 -0500 |
commit | 194a4b526ca3f1e1b13cf27f6ed9aeec3a2e9f89 (patch) | |
tree | af1aeeb8b43d4018efb8e9ef22ab47cca42743d8 /tests/auth_tests/test_models.py | |
parent | 3defe76385ef5ce7558bad82e613318291e0a03c (diff) | |
download | django-194a4b526ca3f1e1b13cf27f6ed9aeec3a2e9f89.tar.gz |
Added tests for ContentType/Group/Permission.__str__().
Diffstat (limited to 'tests/auth_tests/test_models.py')
-rw-r--r-- | tests/auth_tests/test_models.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/auth_tests/test_models.py b/tests/auth_tests/test_models.py index 8387c5f9ee..3c1b8fae64 100644 --- a/tests/auth_tests/test_models.py +++ b/tests/auth_tests/test_models.py @@ -368,3 +368,15 @@ class AnonymousUserTests(SimpleTestCase): def test_check_password(self): with self.assertRaisesMessage(NotImplementedError, self.no_repr_msg): self.user.check_password('password') + + +class GroupTests(SimpleTestCase): + def test_str(self): + g = Group(name='Users') + self.assertEqual(str(g), 'Users') + + +class PermissionTests(TestCase): + def test_str(self): + p = Permission.objects.get(codename='view_customemailfield') + self.assertEqual(str(p), 'auth_tests | custom email field | Can view custom email field') |