]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Skip test if check_hostname functionality not available 1270/head
authorDaniel James Visentin <daniel.visentin@nicta.com.au>
Tue, 23 Dec 2014 01:34:04 +0000 (12:34 +1100)
committerDaniel James Visentin <daniel.visentin@nicta.com.au>
Tue, 23 Dec 2014 01:34:04 +0000 (12:34 +1100)
tornado/test/iostream_test.py

index 280416844bfa9e23f06d790254e4d1b0c2f225ec..ad91034352f1e4094ef9252ae27c571506b9dd00 100644 (file)
@@ -881,8 +881,14 @@ class TestIOStreamStartTLS(AsyncTestCase):
             with self.assertRaises(ssl.SSLError):
                 yield client_future
 
+
+    @unittest.skipIf(not hasattr(ssl, 'create_default_context'),
+                     'ssl.create_default_context not present')
     @gen_test
     def test_check_hostname(self):
+        # Test that server_hostname parameter to start_tls is being used.
+        # The check_hostname functionality is only available in python 2.7 and
+        # up and in python 3.4 and up.
         self.server_start_tls(_server_ssl_options())
         client_future = self.client_start_tls(
             ssl.create_default_context(),