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
4deb950e
Commit
4deb950e
authored
Apr 03, 2015
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Plain Diff
Issue #22351. MockSslTests tests in test_nntplib now are reported if skipped.
parents
4e3cfa46
80774340
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
Lib/test/test_nntplib.py
Lib/test/test_nntplib.py
+10
-9
No files found.
Lib/test/test_nntplib.py
View file @
4deb950e
...
...
@@ -1509,15 +1509,16 @@ class MockSocketTests(unittest.TestCase):
Handler
,
nntplib
.
NNTPPermanentError
,
authinfo_response
,
login
,
password
)
if
ssl
is
not
None
:
class
MockSslTests
(
MockSocketTests
):
class
nntp_class
(
nntplib
.
NNTP_SSL
):
def
__init__
(
self
,
*
pos
,
**
kw
):
class
bypass_context
:
class
bypass_context
:
"""Bypass encryption and actual SSL module"""
def
wrap_socket
(
sock
,
**
args
):
return
sock
return
super
().
__init__
(
*
pos
,
ssl_context
=
bypass_context
,
**
kw
)
@
unittest
.
skipUnless
(
ssl
,
'requires SSL support'
)
class
MockSslTests
(
MockSocketTests
):
@
staticmethod
def
nntp_class
(
*
pos
,
**
kw
):
return
nntplib
.
NNTP_SSL
(
*
pos
,
ssl_context
=
bypass_context
,
**
kw
)
if
__name__
==
"__main__"
:
...
...
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