'simulate behaviour of group 2 member
GROUPNAME_2 = \'group_b_b_ACCESS_CHILDREN\'
to page_b_b'

def test_menu_access_children_group_2(self):

    self._setup_user_groups()
    all_pages = self._setup_tree_pages()
    self._setup_view_restrictions()
    granted = ['page_a', 'page_c', 'page_c_a', 'page_c_b', 'page_b_b_a', 'page_b_b_b', 'page_b_b_c', 'page_d_a', 'page_d_b', 'page_d_c', 'page_d_d']
    self.assertGrantedVisibility(all_pages, granted, username='user_2')
    urls = self.get_url_dict(all_pages)
    if (get_user_model().USERNAME_FIELD == 'email'):
        user = get_user_model().objects.get(email='user_2@django-cms.org')
    else:
        user = get_user_model().objects.get(username='user_2')
    self.assertViewNotAllowed(urls['/en/page_b/page_b_b/'], user)
    self.assertViewAllowed(urls['/en/page_b/page_b_b/page_b_b_a/'], user)
    self.assertViewNotAllowed(urls['/en/page_b/page_b_b/page_b_b_a/page_b_b_a_a/'], user)
    self.assertViewNotAllowed(urls['/en/page_d/'], user)
    self.assertViewAllowed(urls['/en/page_d/page_d_a/'], user)
