'Setup a platform with api timeout.'

@patch('homeassistant.components.device_tracker._LOGGER.error')
def test_setup_platform_timeout_webservice(self, mock_error, aioclient_mock):

    aioclient_mock.get('http://{}/common_page/login.html'.format(self.host), cookies={'sessionToken': '654321'}, content='successful', exc=asyncio.TimeoutError())
    with assert_setup_component(1, DOMAIN):
        assert setup_component(self.hass, DOMAIN, {DOMAIN: {CONF_PLATFORM: 'upc_connect', CONF_HOST: self.host}})
    assert (len(aioclient_mock.mock_calls) == 1)
    assert ('Error    setting    up    platform' in str(mock_error.call_args_list[(-1)]))
