'Test setting of new swing mode.'

def test_set_swing(self):

    state = self.hass.states.get(ENTITY_CLIMATE)
    self.assertEqual('Off', state.attributes.get('swing_mode'))
    climate.set_swing_mode(self.hass, 'Auto', ENTITY_CLIMATE)
    self.hass.block_till_done()
    state = self.hass.states.get(ENTITY_CLIMATE)
    self.assertEqual('Auto', state.attributes.get('swing_mode'))
