Code

- Add regression test for -c option to mailgw -- bug in issue2550697
authorschlatterbeck <schlatterbeck@57a73879-2fb5-44c3-a270-3262357dd7e2>
Thu, 14 Apr 2011 07:07:22 +0000 (07:07 +0000)
committerschlatterbeck <schlatterbeck@57a73879-2fb5-44c3-a270-3262357dd7e2>
Thu, 14 Apr 2011 07:07:22 +0000 (07:07 +0000)
  wasn't noticed, it would be now.

git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4587 57a73879-2fb5-44c3-a270-3262357dd7e2

test/test_mailgw.py

index 7c11befbf30839271e887e3404e193f56a08ff32..0d698b6f6221d08ad00716d08ed1be658a5e702c 100644 (file)
@@ -261,6 +261,20 @@ Hi there!
         self.assertEqual(self.db.issue.get(nodeid, 'status'), '3')
         self.assertEqual(self.db.issue.get(nodeid, 'priority'), '1')
 
+    def testOptionClass(self):
+        nodeid = 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
+Message-Id: <dummy_test_message_id>
+Reply-To: chef@bork.bork.bork
+Subject: [issue] Testing...
+
+Hi there!
+''', (('-c', 'issue'),))
+        self.assertEqual(self.db.issue.get(nodeid, 'status'), '3')
+        self.assertEqual(self.db.issue.get(nodeid, 'priority'), '1')
+
     def doNewIssue(self):
         nodeid = self._handle_mail('''Content-Type: text/plain;
   charset="iso-8859-1"