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
1dd75a64
Commit
1dd75a64
authored
Jun 25, 2012
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport test_nntplib fixes from default.
parent
62ba0428
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
Lib/test/test_nntplib.py
Lib/test/test_nntplib.py
+5
-2
No files found.
Lib/test/test_nntplib.py
View file @
1dd75a64
...
...
@@ -177,9 +177,12 @@ class NetworkedNNTPTestsMixin:
self
.
assertTrue
(
resp
.
startswith
(
"220 "
),
resp
)
self
.
check_article_resp
(
resp
,
article
,
art_num
)
# Tolerate running the tests from behind a NNTP virus checker
blacklist
=
lambda
line
:
line
.
startswith
(
b'X-Antivirus'
)
filtered_head_lines
=
[
line
for
line
in
head
.
lines
if
not
blacklist
(
line
)]
filtered_lines
=
[
line
for
line
in
article
.
lines
if
not
line
.
startswith
(
b'X-Antivirus'
)]
self
.
assertEqual
(
filtered_lines
,
head
.
lines
+
[
b''
]
+
body
.
lines
)
if
not
blacklist
(
line
)]
self
.
assertEqual
(
filtered_lines
,
filtered_head_
lines
+
[
b''
]
+
body
.
lines
)
def
test_capabilities
(
self
):
# The server under test implements NNTP version 2 and has a
...
...
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