Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
e8a257cd
Commit
e8a257cd
authored
Dec 15, 2013
by
Christian Heimes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test_poplib: skip stls_context test when SNI is not available
parent
cd81520e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
Lib/test/test_poplib.py
Lib/test/test_poplib.py
+5
-0
No files found.
Lib/test/test_poplib.py
View file @
e8a257cd
...
...
@@ -21,10 +21,14 @@ PORT = 0
SUPPORTS_SSL
=
False
if
hasattr
(
poplib
,
'POP3_SSL'
):
import
ssl
from
ssl
import
HAS_SNI
SUPPORTS_SSL
=
True
CERTFILE
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
)
or
os
.
curdir
,
"keycert3.pem"
)
CAFILE
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
)
or
os
.
curdir
,
"pycacert.pem"
)
else
:
HAS_SNI
=
False
requires_ssl
=
skipUnless
(
SUPPORTS_SSL
,
'SSL not supported'
)
# the dummy data returned by server when LIST and RETR commands are issued
...
...
@@ -330,6 +334,7 @@ class TestPOP3Class(TestCase):
self
.
assertEqual
(
resp
,
expected
)
@
requires_ssl
@
skipUnless
(
HAS_SNI
,
'No SNI support in ssl module'
)
def
test_stls_context
(
self
):
expected
=
b'+OK Begin TLS negotiation'
ctx
=
ssl
.
SSLContext
(
ssl
.
PROTOCOL_TLSv1
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment