def assign_user_entity_role(self, username, entityrole, entityId): secClient1 = SecurityClient(base_url, username1, password1) try: secClient1.asign_user_entity_role(username, entityrole, entityId) except Exception, exception: message = exception #"User role not assigned succesfully" raise AssertionError(message)
def assign_user_entity_role_and_expect_error(self, username, entityrole, entityId): secClient1 = SecurityClient(base_url, username1, password1) try: secClient1.asign_user_entity_role(username, entityrole, entityId) message = "Entity role assigned" raise AssertionError(message) except AssertionError: raise AssertionError(message) except Exception, exception: print "Entity role not assigned"