def delete_role_permission(self, rolename, permissionname): secClient1 = SecurityClient(base_url, username1, password1) try: secClient1.delete_role_permission(rolename, permissionname) except Exception, exception: message = exception #"Permission not removed from role" raise AssertionError(message)
def delete_role_permission_and_expect_error(self, rolename, permissionname): secClient1 = SecurityClient(base_url, username1, password1) try: secClient1.delete_role_permission(rolename, permissionname) message = "permission '%s' deleted from role" % permissionname raise AssertionError(message) except AssertionError: raise AssertionError(message) except Exception, exception: print exception