def get_checked_permissions(): permissions = Permission.get_all() checked_permissions = [] for permission in permissions: try: permission_id = request.form[permission.permission_name] checked_permissions.append(permission) except KeyError: pass return checked_permissions
def test_should_return_list_of_all_users(self): permissions = Permission.get_all() self.assertEqual(permissions, [self.admin_permission, self.quality_permission])
def inject_view_and_permissions(): return dict( view=View.search(request.endpoint), permissions=Permission.get_all() )