Skip to content

Commit 5426f2f

Browse files
author
Erik Forsberg
committed
Added simple test for 'Subject: help' functionality.
1 parent f9d5b3f commit 5426f2f

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

test/test_mailgw.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# but WITHOUT ANY WARRANTY; without even the implied warranty of
99
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1010
#
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 $
1212

1313
# TODO: test bcc
1414

@@ -21,7 +21,7 @@
2121
SENDMAILDEBUG = os.environ['SENDMAILDEBUG']
2222

2323
from roundup.mailgw import MailGW, Unauthorized, uidFromAddress, \
24-
parseContent, IgnoreLoop, IgnoreBulk, MailUsageError
24+
parseContent, IgnoreLoop, IgnoreBulk, MailUsageError, MailUsageHelp
2525
from roundup import init, instance, password, rfc2822, __version__
2626

2727
import db_test_base
@@ -1313,6 +1313,20 @@ def testReplytoMatch(self):
13131313
self.assertEqual(nodeid, nodeid2)
13141314
self.assertEqual(nodeid, nodeid3)
13151315

1316+
def testHelpSubject(self):
1317+
message = '''Content-Type: text/plain;
1318+
charset="iso-8859-1"
1319+
From: Chef <[email protected]>
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+
13161330
def test_suite():
13171331
suite = unittest.TestSuite()
13181332
suite.addTest(unittest.makeSuite(MailgwTestCase))

0 commit comments

Comments
 (0)