'Test the sending of a message.'

def send_message(self, topic, message, corrupt=False):

    str_message = json.dumps(message)
    if corrupt:
        mod_message = ((BAD_JSON_PREFIX + str_message) + BAD_JSON_SUFFIX)
    else:
        mod_message = str_message
    fire_mqtt_message(self.hass, topic, mod_message)
    self.hass.block_till_done()
