'Test turn_on when timeout occurs.'

def test_turn_on_timeout(self, aioclient_mock):

    aioclient_mock.post(self.resource, status=500)
    run_coroutine_threadsafe(self.switch.async_turn_on(), self.hass.loop).result()
    assert (self.switch.is_on is None)
