'Test TunnelingTCP4ClientEndpoint'

@defer.inlineCallbacks
def test_download_with_proxy_https_timeout(self):

    http_proxy = self.getURL('')
    domain = 'https://no-such-domain.nosuch'
    request = Request(domain, meta={'proxy': http_proxy, 'download_timeout': 0.2})
    d = self.download_request(request, Spider('foo'))
    timeout = (yield self.assertFailure(d, error.TimeoutError))
    self.assertIn(domain, timeout.osError)
