summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2011-08-05 05:43:11 (GMT)
committerBrett Cannon <brett@python.org>2011-08-05 05:43:11 (GMT)
commit252365bab8814b80a747a1a23e32414c1713c35e (patch)
tree3d2427c9dfdae5065f553c3cc128820a66b26bda
parent40ccea7e1ed77db4e8b56b639da8992afaf5e460 (diff)
downloadcpython-252365bab8814b80a747a1a23e32414c1713c35e.zip
cpython-252365bab8814b80a747a1a23e32414c1713c35e.tar.gz
cpython-252365bab8814b80a747a1a23e32414c1713c35e.tar.bz2
Silence the altered state warning about threadgs when running test_httplib.
-rw-r--r--Lib/test/test_httplib.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_httplib.py b/Lib/test/test_httplib.py
index ce9e346..066a6b7 100644
--- a/Lib/test/test_httplib.py
+++ b/Lib/test/test_httplib.py
@@ -506,8 +506,7 @@ class HTTPSTest(TestCase):
def test_local_good_hostname(self):
# The (valid) cert validates the HTTP hostname
import ssl
- from test.ssl_servers import make_https_server
- server = make_https_server(self, CERT_localhost)
+ server = self.make_server(CERT_localhost)
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
context.verify_mode = ssl.CERT_REQUIRED
context.load_verify_locations(CERT_localhost)
@@ -515,12 +514,12 @@ class HTTPSTest(TestCase):
h.request('GET', '/nonexistent')
resp = h.getresponse()
self.assertEqual(resp.status, 404)
+ del server
def test_local_bad_hostname(self):
# The (valid) cert doesn't validate the HTTP hostname
import ssl
- from test.ssl_servers import make_https_server
- server = make_https_server(self, CERT_fakehostname)
+ server = self.make_server(CERT_fakehostname)
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
context.verify_mode = ssl.CERT_REQUIRED
context.load_verify_locations(CERT_fakehostname)
@@ -538,6 +537,7 @@ class HTTPSTest(TestCase):
h.request('GET', '/nonexistent')
resp = h.getresponse()
self.assertEqual(resp.status, 404)
+ del server
class RequestBodyTest(TestCase):