def get_iis_message(user_id, message_id): """ :param user_id: email owner :param message_id: id message :return: model message with basic fields + header and data """ log_info("Get iis message with message_id = {0} and user_id = {1}".format( message_id, user_id)) response, model = UserMessages().get_iis(user_id, message_id) status_code = HttpLib.get_response_status_code(response) assert (status_code == status_code_200), \ "Error! Get iis message with user_id = {0}, message_id = {1}. \n Status code is {2}, " \ "\n Response text is {3}".format(user_id, message_id, status_code, response.get_response_text(response)) return model
def get_iis_message_with_attach(user_id, message_id, client_id=client): """ :param user_id: email owner :param message_id: id message :param client_id: auth data :return: full model message """ log_info( "Get iis message for attach with message_id = {0} and user_id = {1}". format(message_id, user_id)) response, model = UserMessages().get_iis_with_attach(user_id, message_id) status_code = HttpLib.get_response_status_code(response) assert (status_code == status_code_200), \ "Error! Get iis message for attach with user_id = {0}, message_id = {1}, \nStatus code is {2}, " \ "\nResponse text is: {3}".format(user_id, message_id, status_code, response.get_response_text(response)) return model