Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 307ef8a

Browse files
committed
Merge from 3.2 (Ignore X-Antivirus headers in test_nntplib)
2 parents e51e25a + 14d99a1 commit 307ef8a

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

Lib/test/test_nntplib.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,10 @@ def test_article_head_body(self):
177177
resp, article = self.server.article(art_num)
178178
self.assertTrue(resp.startswith("220 "), resp)
179179
self.check_article_resp(resp, article, art_num)
180-
self.assertEqual(article.lines, head.lines + [b''] + body.lines)
180+
# Tolerate running the tests from behind a NNTP virus checker
181+
filtered_lines = [line for line in article.lines
182+
if not line.startswith(b'X-Antivirus')]
183+
self.assertEqual(filtered_lines, head.lines + [b''] + body.lines)
181184

182185
def test_capabilities(self):
183186
# The server under test implements NNTP version 2 and has a

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ Documentation
134134
Tests
135135
-----
136136

137+
- test_nntplib now tolerates being run from behind NNTP gateways that add
138+
"X-Antivirus" headers to articles
139+
137140
- Issue #15043: test_gdb is now skipped entirely if gdb security settings
138141
block loading of the gdb hooks
139142

0 commit comments

Comments
 (0)