Skip to content

Commit 61ec8a8

Browse files
committed
partly test subject line of 'help' to trigger help message. Can't verify the help message is sent though
1 parent 1b765d1 commit 61ec8a8

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/test_mailgw.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,24 @@ def _get_mail(self):
253253
finally:
254254
f.close()
255255

256+
def testHelpMessage(self):
257+
help_message='''Content-Type: text/plain;
258+
charset="iso-8859-1"
259+
From: Chef <[email protected]>
260+
261+
262+
263+
Message-Id: <dummy_test_message_id>
264+
Subject: help
265+
266+
'''
267+
assert not os.path.exists(SENDMAILDEBUG)
268+
self.assertRaises(MailUsageHelp, self._handle_mail, help_message)
269+
# FIXME I think help sends email. but using _get_mail() doesn't
270+
# work. The file mail-test.log is missing.
271+
# self.compareMessages(self._get_mail(), 1)
272+
273+
256274
# Normal test-case used for both non-pgp test and a test while pgp
257275
# is enabled, so this test is run in both test suites.
258276
def testEmptyMessage(self):

0 commit comments

Comments
 (0)