@@ -563,6 +563,11 @@ def handle_NEWNEWS(self, group, date_str, time_str):
|
563 | 563 | <a4929a40-6328-491a-aaaf-cb79ed7309a2@q2g2000vbk.googlegroups.com> |
564 | 564 | <f30c0419-f549-4218-848f-d7d0131da931@y3g2000vbm.googlegroups.com> |
565 | 565 | .""") |
| 566 | +elif (group == 'comp.lang.python' and |
| 567 | +date_str in ('20100101', '100101') and |
| 568 | +time_str == '090000'): |
| 569 | +self.push_lit('too long line' * 3000 + |
| 570 | +'\n.') |
566 | 571 | else: |
567 | 572 | self.push_lit("""\ |
568 | 573 | 230 An empty list of newsarticles follows |
@@ -1158,6 +1163,11 @@ def test_ihave(self):
|
1158 | 1163 | self.assertEqual(cm.exception.response, |
1159 | 1164 | "435 Article not wanted") |
1160 | 1165 | |
| 1166 | +def test_too_long_lines(self): |
| 1167 | +dt = datetime.datetime(2010, 1, 1, 9, 0, 0) |
| 1168 | +self.assertRaises(nntplib.NNTPDataError, |
| 1169 | +self.server.newnews, "comp.lang.python", dt) |
| 1170 | + |
1161 | 1171 | |
1162 | 1172 | class NNTPv1Tests(NNTPv1v2TestsMixin, MockedNNTPTestsMixin, unittest.TestCase): |
1163 | 1173 | """Tests an NNTP v1 server (no capabilities).""" |
|