Mercurial > p > roundup > code
comparison test/test_mailgw.py @ 3815:2b63b1689cef
Fixes to mailgw subject parsing
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Thu, 15 Feb 2007 03:09:53 +0000 |
| parents | 23470ece29de |
| children | 29759dfcfbcf |
comparison
equal
deleted
inserted
replaced
| 3814:a612bdc6b1d3 | 3815:2b63b1689cef |
|---|---|
| 6 # | 6 # |
| 7 # This module is distributed in the hope that it will be useful, | 7 # This module is distributed in the hope that it will be useful, |
| 8 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 8 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 10 # | 10 # |
| 11 # $Id: test_mailgw.py,v 1.84 2007-01-28 13:49:21 forsberg Exp $ | 11 # $Id: test_mailgw.py,v 1.85 2007-02-15 03:09:53 richard Exp $ |
| 12 | 12 |
| 13 # TODO: test bcc | 13 # TODO: test bcc |
| 14 | 14 |
| 15 import unittest, tempfile, os, shutil, errno, imp, sys, difflib, rfc822, time | 15 import unittest, tempfile, os, shutil, errno, imp, sys, difflib, rfc822, time |
| 16 | 16 |
| 1163 ''') | 1163 ''') |
| 1164 assert not os.path.exists(SENDMAILDEBUG) | 1164 assert not os.path.exists(SENDMAILDEBUG) |
| 1165 self.assertEqual(self.db.issue.get(nodeid, 'title'), | 1165 self.assertEqual(self.db.issue.get(nodeid, 'title'), |
| 1166 '[frobulated] testing') | 1166 '[frobulated] testing') |
| 1167 | 1167 |
| 1168 def testInvalidClassLooseReply(self): | |
| 1169 self.instance.config.MAILGW_SUBJECT_PREFIX_PARSING = 'loose' | |
| 1170 nodeid = self._handle_mail('''Content-Type: text/plain; | |
| 1171 charset="iso-8859-1" | |
| 1172 From: Chef <chef@bork.bork.bork> | |
| 1173 To: issue_tracker@your.tracker.email.domain.example | |
| 1174 Subject: Re: [frobulated] testing | |
| 1175 Cc: richard@test | |
| 1176 Reply-To: chef@bork.bork.bork | |
| 1177 Message-Id: <dummy_test_message_id> | |
| 1178 | |
| 1179 ''') | |
| 1180 assert not os.path.exists(SENDMAILDEBUG) | |
| 1181 self.assertEqual(self.db.issue.get(nodeid, 'title'), | |
| 1182 '[frobulated] testing') | |
| 1183 | |
| 1168 def testInvalidClassLoose(self): | 1184 def testInvalidClassLoose(self): |
| 1169 self.instance.config.MAILGW_SUBJECT_PREFIX_PARSING = 'loose' | 1185 self.instance.config.MAILGW_SUBJECT_PREFIX_PARSING = 'loose' |
| 1170 nodeid = self._handle_mail('''Content-Type: text/plain; | 1186 nodeid = self._handle_mail('''Content-Type: text/plain; |
| 1171 charset="iso-8859-1" | 1187 charset="iso-8859-1" |
| 1172 From: Chef <chef@bork.bork.bork> | 1188 From: Chef <chef@bork.bork.bork> |
