From 04f69fd18406a9361f3c13df32b5f6ea295ecdbf Mon Sep 17 00:00:00 2001 From: Konstantin Lopuhin Date: Mon, 18 Jan 2016 12:37:46 +0300 Subject: [PATCH] add https 1.1 downloader test - localhost is a valid DNS-ID --- tests/test_downloader_handlers.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_downloader_handlers.py b/tests/test_downloader_handlers.py index 84d1aa191..80eed86f2 100644 --- a/tests/test_downloader_handlers.py +++ b/tests/test_downloader_handlers.py @@ -119,7 +119,7 @@ class HttpTestCase(unittest.TestCase): r.putChild(b"broken", BrokenDownloadResource()) self.site = server.Site(r, timeout=None) self.wrapper = WrappingFactory(self.site) - self.host = '127.0.0.1' + self.host = 'localhost' if self.scheme == 'https': self.port = reactor.listenSSL( 0, self.wrapper, ssl_context_factory(), interface=self.host) @@ -273,6 +273,10 @@ class Http11TestCase(HttpTestCase): return d +class Https11TestCase(Http11TestCase): + scheme = 'https' + + class Http11MockServerTestCase(unittest.TestCase): """HTTP 1.1 test case with MockServer""" if twisted_version < (11, 1, 0):