diff options
author | Christian Heimes <christian@cheimes.de> | 2013-12-15 18:39:32 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2013-12-15 18:39:32 (GMT) |
commit | aab99fdd653b6959937ce6eb66192a8881768761 (patch) | |
tree | 522a9dbaa93c71143930f1858aa456889a189214 /Lib/test/test_imaplib.py | |
parent | e7945d76ff1c8927b94e2cc012936326a9d92e60 (diff) | |
download | cpython-aab99fdd653b6959937ce6eb66192a8881768761.zip cpython-aab99fdd653b6959937ce6eb66192a8881768761.tar.gz cpython-aab99fdd653b6959937ce6eb66192a8881768761.tar.bz2 |
test_imaplib: skip check_hostname test when SNI is not available
Diffstat (limited to 'Lib/test/test_imaplib.py')
-rw-r--r-- | Lib/test/test_imaplib.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_imaplib.py b/Lib/test/test_imaplib.py index 2834963..5e0eaea 100644 --- a/Lib/test/test_imaplib.py +++ b/Lib/test/test_imaplib.py @@ -18,6 +18,9 @@ try: import ssl except ImportError: ssl = None + HAS_SNI = False +else: + from ssl import HAS_SNI CERTFILE = None CAFILE = None @@ -349,6 +352,7 @@ class ThreadedNetworkedTestsSSL(BaseThreadedNetworkedTests): imap_class = IMAP4_SSL @reap_threads + @unittest.skipUnless(HAS_SNI, 'No SNI support in ssl module') def test_ssl_verified(self): ssl_context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) ssl_context.verify_mode = ssl.CERT_REQUIRED |