mirror of
https://github.com/jazzband/django-admin2.git
synced 2026-03-30 04:50:24 +00:00
Adding test to check if view permissions have been created.
This commit is contained in:
parent
5ae57ac541
commit
b88587f682
1 changed files with 8 additions and 0 deletions
|
|
@ -285,3 +285,11 @@ class TemplatePermissionTest(TestCase):
|
|||
'{% endwith %}',
|
||||
context)
|
||||
self.assertEqual(result, 'TrueFalse')
|
||||
|
||||
|
||||
class ViewPermissionTest(TestCase):
|
||||
def test_view_permission_was_created(self):
|
||||
permissions = Permission.objects.filter(
|
||||
content_type__app_label='blog',
|
||||
content_type__model='post')
|
||||
self.assertEqual(len(permissions.filter(codename='view_post')), 1)
|
||||
|
|
|
|||
Loading…
Reference in a new issue