|
8 | 8 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
9 | 9 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
10 | 10 | # |
11 | | -# $Id: test_mailgw.py,v 1.82 2007-01-21 18:08:31 forsberg Exp $ |
| 11 | +# $Id: test_mailgw.py,v 1.83 2007-01-21 18:14:35 forsberg Exp $ |
12 | 12 |
|
13 | 13 | # TODO: test bcc |
14 | 14 |
|
|
21 | 21 | SENDMAILDEBUG = os.environ['SENDMAILDEBUG'] |
22 | 22 |
|
23 | 23 | from roundup.mailgw import MailGW, Unauthorized, uidFromAddress, \ |
24 | | - parseContent, IgnoreLoop, IgnoreBulk, MailUsageError |
| 24 | + parseContent, IgnoreLoop, IgnoreBulk, MailUsageError, MailUsageHelp |
25 | 25 | from roundup import init, instance, password, rfc2822, __version__ |
26 | 26 |
|
27 | 27 | import db_test_base |
@@ -1313,6 +1313,20 @@ def testReplytoMatch(self): |
1313 | 1313 | self.assertEqual(nodeid, nodeid2) |
1314 | 1314 | self.assertEqual(nodeid, nodeid3) |
1315 | 1315 |
|
| 1316 | + def testHelpSubject(self): |
| 1317 | + message = '''Content-Type: text/plain; |
| 1318 | + charset="iso-8859-1" |
| 1319 | + |
| 1320 | + |
| 1321 | +Message-Id: <dummy_test_message_id2> |
| 1322 | +In-Reply-To: <dummy_test_message_id> |
| 1323 | +Subject: hElp |
| 1324 | +
|
| 1325 | +
|
| 1326 | +''' |
| 1327 | + self.assertRaises(MailUsageHelp, self._handle_mail, message) |
| 1328 | + |
| 1329 | + |
1316 | 1330 | def test_suite(): |
1317 | 1331 | suite = unittest.TestSuite() |
1318 | 1332 | suite.addTest(unittest.makeSuite(MailgwTestCase)) |
|
0 commit comments