Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 575596e

Browse files
committed
test_ssl: skip tests when SNI is not available
1 parent e8a257c commit 575596e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Lib/test/test_ssl.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,6 +1419,7 @@ def test_get_ca_certs_capath(self):
14191419
s.close()
14201420
self.assertEqual(len(ctx.get_ca_certs()), 1)
14211421

1422+
@needs_sni
14221423
def test_context_setget(self):
14231424
# Check that the context of a connected socket can be replaced.
14241425
with support.transient_internet("svn.python.org"):
@@ -1970,6 +1971,7 @@ def test_crl_check(self):
19701971
cert = s.getpeercert()
19711972
self.assertTrue(cert, "Can't get peer certificate.")
19721973

1974+
@needs_sni
19731975
def test_check_hostname(self):
19741976
if support.verbose:
19751977
sys.stdout.write("\n")

0 commit comments

Comments
 (0)