From 3cd1598c51e6ee03b90ee59948cff88ce758f6f5 Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Fri, 1 Jan 2021 08:52:51 +0000 Subject: [PATCH 1/2] bpo-42794: Update test_nntplib to use offical group name for testing --- Lib/test/test_nntplib.py | 8 +++++--- .../next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst diff --git a/Lib/test/test_nntplib.py b/Lib/test/test_nntplib.py index b11c19c84d3fb1..914c54c08a4f47 100644 --- a/Lib/test/test_nntplib.py +++ b/Lib/test/test_nntplib.py @@ -82,7 +82,7 @@ def _check_desc(desc): desc = self.server.description(self.GROUP_NAME) _check_desc(desc) # Another sanity check - self.assertIn("Python", desc) + self.assertIn(self.DESC, desc) # With a pattern desc = self.server.description(self.GROUP_PAT) _check_desc(desc) @@ -309,6 +309,7 @@ class NetworkedNNTPTests(NetworkedNNTPTestsMixin, unittest.TestCase): NNTP_HOST = 'news.trigofacile.com' GROUP_NAME = 'fr.comp.lang.python' GROUP_PAT = 'fr.comp.lang.*' + DESC = 'Python' NNTP_CLASS = NNTP @@ -343,8 +344,9 @@ class NetworkedNNTP_SSLTests(NetworkedNNTPTests): # 400 connections per day are accepted from each IP address." NNTP_HOST = 'nntp.aioe.org' - GROUP_NAME = 'comp.lang.python' - GROUP_PAT = 'comp.lang.*' + GROUP_NAME = 'aioe.test' + GROUP_PAT = 'aioe.*' + DESC = 'test' NNTP_CLASS = getattr(nntplib, 'NNTP_SSL', None) diff --git a/Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst b/Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst new file mode 100644 index 00000000000000..577f2259e1f00c --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2021-01-01-08-52-36.bpo-42794.-7-XGz.rst @@ -0,0 +1,2 @@ +Update test_nntplib to use offical group name of news.aioe.org for testing. +Patch by Dong-hee Na. From a0fad10e76fcee054074c6b6c8685db0dec0b64a Mon Sep 17 00:00:00 2001 From: Dong-hee Na Date: Fri, 1 Jan 2021 13:59:59 +0000 Subject: [PATCH 2/2] bpo-42794: Apply code review --- Lib/test/test_nntplib.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/test/test_nntplib.py b/Lib/test/test_nntplib.py index 914c54c08a4f47..4dbf941036f099 100644 --- a/Lib/test/test_nntplib.py +++ b/Lib/test/test_nntplib.py @@ -344,6 +344,8 @@ class NetworkedNNTP_SSLTests(NetworkedNNTPTests): # 400 connections per day are accepted from each IP address." NNTP_HOST = 'nntp.aioe.org' + # bpo-42794: aioe.test is one of the official groups on this server + # used for testing: https://news.aioe.org/manual/aioe-hierarchy/ GROUP_NAME = 'aioe.test' GROUP_PAT = 'aioe.*' DESC = 'test'