Mercurial > p > roundup > code
comparison test/test_mailgw.py @ 3579:7f1e2d650486
fix blank-title subject line handling [SF#1442121]
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Thu, 02 Mar 2006 23:45:23 +0000 |
| parents | 07c696890f55 |
| children | 9365dcf5d587 |
comparison
equal
deleted
inserted
replaced
| 3578:782287e01b99 | 3579:7f1e2d650486 |
|---|---|
| 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.76 2005-10-07 04:42:13 richard Exp $ | 11 # $Id: test_mailgw.py,v 1.77 2006-03-02 23:45:23 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 |
| 687 self.john_id]) | 687 self.john_id]) |
| 688 | 688 |
| 689 # should be no file created (ie. no message) | 689 # should be no file created (ie. no message) |
| 690 assert not os.path.exists(SENDMAILDEBUG) | 690 assert not os.path.exists(SENDMAILDEBUG) |
| 691 | 691 |
| 692 def testFollowupEmptyMessageNoSubject(self): | |
| 693 self.doNewIssue() | |
| 694 | |
| 695 self._handle_mail('''Content-Type: text/plain; | |
| 696 charset="iso-8859-1" | |
| 697 From: richard <richard@test> | |
| 698 To: issue_tracker@your.tracker.email.domain.example | |
| 699 Message-Id: <followup_dummy_id> | |
| 700 In-Reply-To: <dummy_test_message_id> | |
| 701 Subject: [issue1] [assignedto=mary; nosy=+john] | |
| 702 | |
| 703 ''') | |
| 704 l = self.db.issue.get('1', 'nosy') | |
| 705 l.sort() | |
| 706 self.assertEqual(l, [self.chef_id, self.richard_id, self.mary_id, | |
| 707 self.john_id]) | |
| 708 | |
| 709 # should be no file created (ie. no message) | |
| 710 assert not os.path.exists(SENDMAILDEBUG) | |
| 711 | |
| 692 def testNosyRemove(self): | 712 def testNosyRemove(self): |
| 693 self.doNewIssue() | 713 self.doNewIssue() |
| 694 | 714 |
| 695 self._handle_mail('''Content-Type: text/plain; | 715 self._handle_mail('''Content-Type: text/plain; |
| 696 charset="iso-8859-1" | 716 charset="iso-8859-1" |
