Mercurial > p > roundup > code
comparison test/test_mailgw.py @ 3724:b4d655b2aacf
E-mail subject line prefix delimiter configuration was being ignored
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Thu, 05 Oct 2006 23:08:21 +0000 |
| parents | 9365dcf5d587 |
| children | 12fc9a8bd3e6 |
comparison
equal
deleted
inserted
replaced
| 3723:e0d13120a330 | 3724:b4d655b2aacf |
|---|---|
| 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.78 2006-08-18 01:31:38 richard Exp $ | 11 # $Id: test_mailgw.py,v 1.79 2006-10-05 23:08:21 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 |
| 1251 ''') | 1251 ''') |
| 1252 assert not os.path.exists(SENDMAILDEBUG) | 1252 assert not os.path.exists(SENDMAILDEBUG) |
| 1253 self.assertEqual(self.db.issue.get(nodeid, 'title'), 'testing') | 1253 self.assertEqual(self.db.issue.get(nodeid, 'title'), 'testing') |
| 1254 self.assertEqual(self.db.issue.get(nodeid, 'assignedto'), self.mary_id) | 1254 self.assertEqual(self.db.issue.get(nodeid, 'assignedto'), self.mary_id) |
| 1255 | 1255 |
| 1256 def testPrefixDelimiters(self): | |
| 1257 self.instance.config.MAILGW_SUBJECT_SUFFIX_DELIMITERS = '{}' | |
| 1258 self.db.keyword.create(name='Foo') | |
| 1259 self._handle_mail('''Content-Type: text/plain; | |
| 1260 charset="iso-8859-1" | |
| 1261 From: richard <richard@test> | |
| 1262 To: issue_tracker@your.tracker.email.domain.example | |
| 1263 Message-Id: <followup_dummy_id> | |
| 1264 In-Reply-To: <dummy_test_message_id> | |
| 1265 Subject: {keyword1} Testing... {name=Bar} | |
| 1266 | |
| 1267 ''') | |
| 1268 assert not os.path.exists(SENDMAILDEBUG) | |
| 1269 self.assertEqual(self.db.keyword.get('1', 'name'), 'Bar') | |
| 1270 | |
| 1256 def testCommandDelimitersIgnore(self): | 1271 def testCommandDelimitersIgnore(self): |
| 1257 self.instance.config.MAILGW_SUBJECT_SUFFIX_DELIMITERS = '{}' | 1272 self.instance.config.MAILGW_SUBJECT_SUFFIX_DELIMITERS = '{}' |
| 1258 nodeid = self._handle_mail('''Content-Type: text/plain; | 1273 nodeid = self._handle_mail('''Content-Type: text/plain; |
| 1259 charset="iso-8859-1" | 1274 charset="iso-8859-1" |
| 1260 From: Chef <chef@bork.bork.bork> | 1275 From: Chef <chef@bork.bork.bork> |
