'Test setting the direction of the device.'

def test_set_direction(self):

    self.assertEqual(STATE_OFF, self.get_entity().state)
    fan.set_direction(self.hass, FAN_ENTITY_ID, fan.DIRECTION_REVERSE)
    self.hass.block_till_done()
    self.assertEqual(fan.DIRECTION_REVERSE, self.get_entity().attributes.get('direction'))
