def delete_user_system_role(self, username, systemrole): secClient1 = SecurityClient(base_url, username1, password1) try: secClient1.delete_user_system_role(username, systemrole) except Exception, exception: message = exception #"User role not deleted succesfully" raise AssertionError(message)
def delete_user_system_role_and_expect_error(self, username, systemrole): secClient1 = SecurityClient(base_url, username1, password1) try: secClient1.delete_user_system_role(username, systemrole) message = "System role deleted" raise AssertionError(message) except AssertionError: raise AssertionError(message) except Exception, exception: print "System role not deleted"