mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Added tests for ContentType/Group/Permission.__str__().
This commit is contained in:
parent
3defe76385
commit
194a4b526c
2 changed files with 16 additions and 0 deletions
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue