def delete_role(self, rolename, deletereason): secClient1 = SecurityClient(base_url, username1, password1) try: secClient1.delete_role(rolename, deletereason) except Exception, exception: message = exception #"Role not deleted" raise AssertionError(message)
def delete_role_and_expect_error(self, rolename, deletereason): secClient1 = SecurityClient(base_url, username1, password1) try: secClient1.delete_role(rolename, deletereason) message = "Role Deleted" raise AssetionError(message) except AssertionError: raise AssertionError(message) except Exception, exception: print "Role '%s' not deleted" % rolename