[Python-checkins] cpython (merge 3.2 -> default): Merge from 3.2 (Ignore X-Antivirus headers in test_nntplib)
nick.coghlan
python-checkins at python.org
Sun Jun 17 13:30:53 CEST 2012
http://hg.python.org/cpython/rev/c0eab397f098
changeset: 77494:c0eab397f098
parent: 77492:bbe1a2049ca1
parent: 77493:201484fb885e
user: Nick Coghlan <ncoghlan at gmail.com>
date: Sun Jun 17 21:30:35 2012 +1000
summary:
Merge from 3.2 (Ignore X-Antivirus headers in test_nntplib)
files:
Lib/test/test_nntplib.py | 5 ++++-
Misc/NEWS | 3 +++
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/Lib/test/test_nntplib.py b/Lib/test/test_nntplib.py
--- a/Lib/test/test_nntplib.py
+++ b/Lib/test/test_nntplib.py
@@ -177,7 +177,10 @@
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
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -134,6 +134,9 @@
Tests
-----
+- test_nntplib now tolerates being run from behind NNTP gateways that add
+ "X-Antivirus" headers to articles
+
- Issue #15043: test_gdb is now skipped entirely if gdb security settings
block loading of the gdb hooks
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list