def assign_user_system_role(self, username, systemrole1): secClient1 = SecurityClient(base_url, username1, password1) try: secClient1.asign_user_system_role(username, systemrole1) except Exception, exception: message = exception #"User role not assigned succesfully" raise AssertionError(message)
def assign_user_system_role_and_expect_error(self, username, systemrole): secClient1 = SecurityClient(base_url, username1, password1) try: secClient1.asign_user_system_role(username, systemrole) message = "User role assigned" raise AssertionError(message) except AssertionError: raise AssertionError(message) except Exception, exception: print "User role not assigned"