mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
Skip some tests that require server name indication (SNI)
This commit is contained in:
parent
21ebbb2777
commit
a5f0eda91a
1 changed files with 6 additions and 0 deletions
|
|
@ -10,6 +10,9 @@
|
|||
import ssl
|
||||
except ImportError:
|
||||
ssl = None
|
||||
HAS_SNI = False
|
||||
else:
|
||||
from ssl import HAS_SNI
|
||||
import subprocess
|
||||
import sys
|
||||
import threading
|
||||
|
|
@ -666,6 +669,7 @@ def factory():
|
|||
server.close()
|
||||
|
||||
@unittest.skipIf(ssl is None, 'No ssl module')
|
||||
@unittest.skipUnless(HAS_SNI, 'No SNI support in ssl module')
|
||||
def test_create_server_ssl_verify_failed(self):
|
||||
proto = None
|
||||
|
||||
|
|
@ -694,6 +698,7 @@ def factory():
|
|||
server.close()
|
||||
|
||||
@unittest.skipIf(ssl is None, 'No ssl module')
|
||||
@unittest.skipUnless(HAS_SNI, 'No SNI support in ssl module')
|
||||
def test_create_server_ssl_match_failed(self):
|
||||
proto = None
|
||||
|
||||
|
|
@ -724,6 +729,7 @@ def factory():
|
|||
server.close()
|
||||
|
||||
@unittest.skipIf(ssl is None, 'No ssl module')
|
||||
@unittest.skipUnless(HAS_SNI, 'No SNI support in ssl module')
|
||||
def test_create_server_ssl_verified(self):
|
||||
proto = None
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue