• Home
  • Raw
  • Download

Lines Matching +full:demo +full:- +full:v2

29         """Non-existent exception class when we lack SSL support."""
33 # - test the `file` arg to more commands
34 # - test error conditions
35 # - test auth and `usenetrc`
73 dt = datetime.date.today() - datetime.timedelta(days=7)
127 {"subject", "from", "date", "message-id",
135 resp, lines = self.server.xover(last - 5, last)
140 self.assertGreaterEqual(art_num, last - 5)
148 start = last - 10
149 # The "start-" article range form
153 # The "start-end" article range form
155 art_num, art_dict = lines[-1]
161 # 503 Overview by message-ID unsupported
176 self.assertNotIn(article.lines[-1], (b".", b".\n", b".\r\n"))
178 @unittest.skipIf(True, "FIXME: see bpo-32128")
182 for art_num in (last, first, last - 1):
202 denylist = lambda line: line.startswith(b'X-Antivirus')
211 # couple of well-known capabilities. Just sanity check that we
219 # This re-emits the command
357 # bpo-42794: aioe.test is one of the official groups on this server
358 # used for testing: https://news.aioe.org/manual/aioe-hierarchy/
377 # Non-networked tests using a local server (or something mocking it).
485 return str(data, "utf-8", "surrogateescape")
509 line = line[:-2]
537 lit = lit.encode('utf-8')
611 Message-ID:
642 # Date was passed in RFC 3977 format (NNTP "v2")
644 230 list of newsarticles (NNTP v2) created after Mon Sep 13 08:20:04 2010 follows
645 <a4929a40-6328-491a-aaaf-cb79ed7309a2@q2g2000vbk.googlegroups.com>
646 <f30c0419-f549-4218-848f-d7d0131da931@y3g2000vbm.googlegroups.com>
653 <a4929a40-6328-491a-aaaf-cb79ed7309a2@q2g2000vbk.googlegroups.com>
654 <f30c0419-f549-4218-848f-d7d0131da931@y3g2000vbm.googlegroups.com>
669 if message_spec == "57-59":
671 "224 Overview information for 57-58 follows\n"
673 "\tDoug Hellmann <doug.hellmann-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>"
674 "\tSat, 19 Jun 2010 18:04:08 -0400"
675 "\t<4FD05F05-F98B-44DC-8111-C6009C925F0C@gmail.com>"
680 "\tDoug Hellmann <doug.hellmann-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>"
681 "\tThu, 22 Jul 2010 09:14:14 -0400"
682 "\t<A29863FA-F388-40C3-AA25-0FD06B09B5BF@gmail.com>"
686 # A UTF-8 overview line from fr.comp.lang.python
690 "\t<eric.brunel-2B8B56.18091515092010@news.wanadoo.fr>"
703 self.push_lit("340 Input article; end with <CR-LF>.<CR-LF>")
716 self.push_lit("335 Send it; end with <CR-LF>.<CR-LF>")
726 From: "Demo User" <nobody@example.net>
728 Content-Type: text/plain; charset=UTF-8; format=flowed
729 Message-ID: <i.am.an.article.you.will.want@example.com>"""
733 ..Here is a dot-starting line.
735 -- Signed by Andr\xe9."""
795 """A handler for RFC 3977 (NNTP "v2")"""
851 self.push_lit(fmt.format('MODE-'))
981 "<a4929a40-6328-491a-aaaf-cb79ed7309a2@q2g2000vbk.googlegroups.com>",
982 "<f30c0419-f549-4218-848f-d7d0131da931@y3g2000vbm.googlegroups.com>",
992 self.assertEqual(lines[-1].decode('utf-8'), "-- Signed by André.")
993 self.assertEqual(lines[-2], b"")
994 self.assertEqual(lines[-3], b".Here is a dot-starting line.")
995 self.assertEqual(lines[-4], b"This is just a test article.")
999 self.assertEqual(lines[0], b'From: "Demo User" <nobody@example.net>')
1000 self.assertEqual(lines[3], b"Message-ID: <i.am.an.article.you.will.want@example.com>")
1005 self._check_article_body(lines[-4:])
1030 # Non-existent id
1032 self.server.article("<non-existent@example.com>")
1046 b'From: "Demo User" <nobody@example.net>\r\n'
1051 b'.Here is a dot-starting line.\r\n'
1053 b'-- Signed by Andr\xc3\xa9.\r\n'
1078 # Non-existent id
1080 self.server.head("<non-existent@example.com>")
1093 b'From: "Demo User" <nobody@example.net>\r\n'
1098 b'.Here is a dot-starting line.\r\n'
1100 b'-- Signed by Andr\xc3\xa9.\r\n'
1125 # Non-existent id
1127 self.server.body("<non-existent@example.com>")
1140 b'From: "Demo User" <nobody@example.net>\r\n'
1145 b'.Here is a dot-starting line.\r\n'
1147 b'-- Signed by Andr\xc3\xa9.\r\n'
1156 "from": "Doug Hellmann <doug.hellmann-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>",
1158 "date": "Sat, 19 Jun 2010 18:04:08 -0400",
1159 "message-id": "<4FD05F05-F98B-44DC-8111-C6009C925F0C@gmail.com>",
1181 b'From: "Demo User" <nobody@example.net>\r\n'
1183 b'Content-Type: text/plain; charset=UTF-8; format=flowed\r\n'
1184 b'Message-ID: <i.am.an.article.you.will.want@example.com>\r\n'
1187 b'.Here is a dot-starting line.\r\n'
1189 b'-- Signed by Andr\xc3\xa9.\r\n'
1197 self.assertEqual(lines[-1], b'.\r\n')
1198 self.assertEqual(lines[-2], b'-- Signed by Andr\xc3\xa9.\r\n')
1199 self.assertEqual(lines[-3], b'\r\n')
1200 self.assertEqual(lines[-4], b'..Here is a dot-starting line.\r\n')
1201 self.assertEqual(lines[0], b'From: "Demo User" <nobody@example.net>\r\n')
1210 # Then the same post with "normal" line endings - they should be
1234 # With an iterable of non-terminated lines
1276 """Tests an NNTP v2 server (with capabilities)."""
1299 """Tests a probably NNTP v2 server with capabilities only after login."""
1312 """Same tests as for v2 but we tell NTTP to send MODE READER to a server
1330 gives("=?ISO-8859-15?Q?D=E9buter_en_Python?=", "Débuter en Python")
1331 gives("=?utf-8?q?Re=3A_=5Bsqlite=5D_probl=C3=A8me_avec_ORDER_BY_sur_des_cha?="
1332 " =?utf-8?q?=C3=AEnes_de_caract=C3=A8res_accentu=C3=A9es?=",
1334 gives("Re: =?UTF-8?B?cHJvYmzDqG1lIGRlIG1hdHJpY2U=?=",
1336 # A natively utf-8 header (found in the real world!)
1342 lines = ["Subject:", "From:", "Date:", "Message-ID:",
1345 ["subject", "from", "date", "message-id", "references",
1348 lines = ["Subject:", "From:", "Date:", "Message-ID:",
1351 ["subject", "from", "date", "message-id", "references",
1354 lines = ["subject:", "FROM:", "DaTe:", "message-ID:",
1357 ["subject", "from", "date", "message-id", "references",
1360 lines = ["Subject:", "From:", "Date:", "Message-ID:",
1364 ["subject", "from", "date", "message-id", "references",
1367 lines = ["Subject:", "From:", "Date:", "Message-ID:",
1371 ["subject", "from", "date", "message-id", "references",
1374 lines = ["Subject:", "From:", "Date:", "Message-ID:",
1377 ["subject", "from", "date", "message-id", "references",
1384 '3000234\tI am just a test article\t"Demo User" '
1385 '<nobody@example.com>\t6 Oct 1998 04:38:40 -0500\t'
1394 'from': '"Demo User" <nobody@example.com>',
1395 'date': '6 Oct 1998 04:38:40 -0500',
1396 'message-id': '<45223423@example.com>',
1405 '3000234\tI am just a test article\t"Demo User" '
1406 '<nobody@example.com>\t6 Oct 1998 04:38:40 -0500\t'
1416 '3000234\tI am just a test article\t"Demo User" '
1417 '<nobody@example.com>\t6 Oct 1998 04:38:40 -0500\t'
1438 # Test non-legacy mode
1635 # Check that the socket and internal pseudo-file really were