summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2012-06-17 11:30:35 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2012-06-17 11:30:35 (GMT)
commit307ef8aee5a79095d7088a60615a46260d159a98 (patch)
tree8c74027331ef20d09feeb2d81433552558f6412c /Lib/test
parente51e25a3bc6e4e8396ebf63c78f269fabae0f0d0 (diff)
parent14d99a14912343061463049e814a15127e79c69e (diff)
downloadcpython-307ef8aee5a79095d7088a60615a46260d159a98.zip
cpython-307ef8aee5a79095d7088a60615a46260d159a98.tar.gz
cpython-307ef8aee5a79095d7088a60615a46260d159a98.tar.bz2
Merge from 3.2 (Ignore X-Antivirus headers in test_nntplib)
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_nntplib.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_nntplib.py b/Lib/test/test_nntplib.py
index c5146c1..e115523 100644
--- a/Lib/test/test_nntplib.py
+++ b/Lib/test/test_nntplib.py
@@ -177,7 +177,10 @@ class NetworkedNNTPTestsMixin:
resp, article = self.server.article(art_num)
self.assertTrue(resp.startswith("220 "), resp)
self.check_article_resp(resp, article, art_num)
- self.assertEqual(article.lines, head.lines + [b''] + body.lines)
+ # Tolerate running the tests from behind a NNTP virus checker
+ filtered_lines = [line for line in article.lines
+ if not line.startswith(b'X-Antivirus')]
+ self.assertEqual(filtered_lines, head.lines + [b''] + body.lines)
def test_capabilities(self):
# The server under test implements NNTP version 2 and has a