Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd81520 commit e8a257cCopy full SHA for e8a257c
1 file changed
Lib/test/test_poplib.py
@@ -21,10 +21,14 @@
21
SUPPORTS_SSL = False
22
if hasattr(poplib, 'POP3_SSL'):
23
import ssl
24
+ from ssl import HAS_SNI
25
26
SUPPORTS_SSL = True
27
CERTFILE = os.path.join(os.path.dirname(__file__) or os.curdir, "keycert3.pem")
28
CAFILE = os.path.join(os.path.dirname(__file__) or os.curdir, "pycacert.pem")
29
+else:
30
+ HAS_SNI = False
31
+
32
requires_ssl = skipUnless(SUPPORTS_SSL, 'SSL not supported')
33
34
# the dummy data returned by server when LIST and RETR commands are issued
@@ -330,6 +334,7 @@ def test_stls(self):
330
334
self.assertEqual(resp, expected)
331
335
332
336
@requires_ssl
337
+ @skipUnless(HAS_SNI, 'No SNI support in ssl module')
333
338
def test_stls_context(self):
339
expected = b'+OK Begin TLS negotiation'
340
ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
0 commit comments