diff test/test_mailgw.py @ 3368:246fed02a51e maint-0.8

merge from HEAD
author Richard Jones <richard@users.sourceforge.net>
date Fri, 24 Jun 2005 06:48:17 +0000
parents f412ae175b4d
children b854a6a08fff
line wrap: on
line diff
--- a/test/test_mailgw.py	Fri Jun 24 06:40:18 2005 +0000
+++ b/test/test_mailgw.py	Fri Jun 24 06:48:17 2005 +0000
@@ -8,7 +8,7 @@
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 #
-# $Id: test_mailgw.py,v 1.73.2.1 2005-02-14 05:55:20 richard Exp $
+# $Id: test_mailgw.py,v 1.73.2.2 2005-06-24 06:48:17 richard Exp $
 
 # TODO: test bcc
 
@@ -21,7 +21,7 @@
 SENDMAILDEBUG = os.environ['SENDMAILDEBUG']
 
 from roundup.mailgw import MailGW, Unauthorized, uidFromAddress, \
-    parseContent, IgnoreLoop, IgnoreBulk
+    parseContent, IgnoreLoop, IgnoreBulk, MailUsageError
 from roundup import init, instance, password, rfc2822, __version__
 
 import db_test_base
@@ -1020,6 +1020,18 @@
 Hi, I'm back in the office next week
 ''')
 
+    def testNoSubject(self):
+        self.assertRaises(MailUsageError, self._handle_mail,
+            '''Content-Type: text/plain;
+  charset="iso-8859-1"
+From: Chef <chef@bork.bork.bork>
+To: issue_tracker@your.tracker.email.domain.example
+Cc: richard@test
+Reply-To: chef@bork.bork.bork
+Message-Id: <dummy_test_message_id>
+
+''')
+
 def test_suite():
     suite = unittest.TestSuite()
     suite.addTest(unittest.makeSuite(MailgwTestCase))

Roundup Issue Tracker: http://roundup-tracker.org/