'Setup a view restriction with every type of the grant_on ACCESS_*'

def _setup_view_restrictions(self):

    data = [('page_b', self.GROUPNAME_1, ACCESS_PAGE_AND_CHILDREN), ('page_b_b', self.GROUPNAME_2, ACCESS_CHILDREN), ('page_b', self.GROUPNAME_3, ACCESS_PAGE_AND_DESCENDANTS), ('page_b_b', self.GROUPNAME_4, ACCESS_DESCENDANTS), ('page_d', self.GROUPNAME_5, ACCESS_PAGE)]
    for (title, groupname, inherit) in data:
        page = Page.objects.drafts().get(title_set__title=title)
        group = Group.objects.get(name__iexact=groupname)
        PagePermission.objects.create(can_view=True, group=group, page=page, grant_on=inherit)
    self.assertEqual(5, PagePermission.objects.all().count())
    self.assertEqual(0, GlobalPagePermission.objects.all().count())
