summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_urllib2net.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-02-05 20:20:51 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2013-02-05 20:20:51 (GMT)
commitda23259f992a5f962fa9f95acb6608c2ecada348 (patch)
tree83ad109c52a2392454666594c52e1bcd1d5a79d5 /Lib/test/test_urllib2net.py
parentca4220be1ff291fed1b6d1da4ebcf3eab7f1a2ca (diff)
downloadcpython-da23259f992a5f962fa9f95acb6608c2ecada348.zip
cpython-da23259f992a5f962fa9f95acb6608c2ecada348.tar.gz
cpython-da23259f992a5f962fa9f95acb6608c2ecada348.tar.bz2
Issue #17107: Test client-side SNI support in urllib.request thanks to the new server-side SNI support in the ssl module.
Initial patch by Daniel Black.
Diffstat (limited to 'Lib/test/test_urllib2net.py')
-rw-r--r--Lib/test/test_urllib2net.py22
1 files changed, 0 insertions, 22 deletions
diff --git a/Lib/test/test_urllib2net.py b/Lib/test/test_urllib2net.py
index b3c1a68..e276d2e 100644
--- a/Lib/test/test_urllib2net.py
+++ b/Lib/test/test_urllib2net.py
@@ -330,31 +330,9 @@ class TimeoutTest(unittest.TestCase):
self.assertEqual(u.fp.fp.raw._sock.gettimeout(), 60)
-@unittest.skipUnless(ssl, "requires SSL support")
-class HTTPSTests(unittest.TestCase):
-
- def test_sni(self):
- self.skipTest("test disabled - test server needed")
- # Checks that Server Name Indication works, if supported by the
- # OpenSSL linked to.
- # The ssl module itself doesn't have server-side support for SNI,
- # so we rely on a third-party test site.
- expect_sni = ssl.HAS_SNI
- with support.transient_internet("XXX"):
- u = urllib.request.urlopen("XXX")
- contents = u.readall()
- if expect_sni:
- self.assertIn(b"Great", contents)
- self.assertNotIn(b"Unfortunately", contents)
- else:
- self.assertNotIn(b"Great", contents)
- self.assertIn(b"Unfortunately", contents)
-
-
def test_main():
support.requires("network")
support.run_unittest(AuthTests,
- HTTPSTests,
OtherNetworkTests,
CloseSocketTest,
TimeoutTest,