'Test setting of new operation mode.'

def test_set_operation(self):

    state = self.hass.states.get(ENTITY_CLIMATE)
    self.assertEqual('cool', state.attributes.get('operation_mode'))
    self.assertEqual('cool', state.state)
    climate.set_operation_mode(self.hass, 'heat', ENTITY_CLIMATE)
    self.hass.block_till_done()
    state = self.hass.states.get(ENTITY_CLIMATE)
    self.assertEqual('heat', state.attributes.get('operation_mode'))
    self.assertEqual('heat', state.state)
