]> granicus.if.org Git - python/commitdiff
test_ssl: skip tests when SNI is not available
authorChristian Heimes <christian@cheimes.de>
Sun, 15 Dec 2013 20:49:17 +0000 (21:49 +0100)
committerChristian Heimes <christian@cheimes.de>
Sun, 15 Dec 2013 20:49:17 +0000 (21:49 +0100)
Lib/test/test_ssl.py

index 92dc31afa99e85cdfe7c187638678abf0aed65d1..71e20babd39ec12ec44f582be27e46811eb1af6c 100644 (file)
@@ -1419,6 +1419,7 @@ class NetworkedTests(unittest.TestCase):
                 s.close()
             self.assertEqual(len(ctx.get_ca_certs()), 1)
 
+    @needs_sni
     def test_context_setget(self):
         # Check that the context of a connected socket can be replaced.
         with support.transient_internet("svn.python.org"):
@@ -1970,6 +1971,7 @@ else:
                     cert = s.getpeercert()
                     self.assertTrue(cert, "Can't get peer certificate.")
 
+        @needs_sni
         def test_check_hostname(self):
             if support.verbose:
                 sys.stdout.write("\n")