'Test publishing of MQTT messages while armed.'

def test_arm_away_publishes_mqtt(self):

    assert setup_component(self.hass, alarm_control_panel.DOMAIN, {alarm_control_panel.DOMAIN: {'platform': 'mqtt', 'name': 'test', 'state_topic': 'alarm/state', 'command_topic': 'alarm/command'}})
    alarm_control_panel.alarm_arm_away(self.hass)
    self.hass.block_till_done()
    self.assertEqual(('alarm/command', 'ARM_AWAY', 0, False), self.mock_publish.mock_calls[(-2)][1])
