add https 1.1 downloader test - localhost is a valid DNS-ID

This commit is contained in:
Konstantin Lopuhin 2016-01-18 12:37:46 +03:00
parent f403c88053
commit 04f69fd184
1 changed files with 5 additions and 1 deletions

View File

@ -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):