def test_update_and_verify_permission_role(self):
    role_name = 'Test_Role'
    self.security_manager.init_role(role_name, [])
    role = self.security_manager.find_role(role_name)
    perm = self.security_manager.find_permission_view_menu(permissions.ACTION_CAN_EDIT, 'RoleModelView')
    self.security_manager.add_permission_role(role, perm)
    role_perms_len = len(role.permissions)
    self.security_manager.init_role(role_name, [])
    new_role_perms_len = len(role.permissions)
    self.assertEqual(role_perms_len, new_role_perms_len)
def test_update_and_verify_permission_role(self):
    role_name = 'Test_Role'
    self.security_manager.init_role(role_name, [])
    role = self.security_manager.find_role(role_name)
    perm = self.security_manager.find_permission_view_menu(permissions.ACTION_CAN_EDIT, 'RoleModelView')
    self.security_manager.add_permission_role(role, perm)
    role_perms_len = len(role.permissions)
    self.security_manager.init_role(role_name, [])
    new_role_perms_len = len(role.permissions)
    self.assertEqual(role_perms_len, new_role_perms_len)