Mercurial > p > roundup > code
comparison test/test_mailgw.py @ 4405:863ec554525c
new mailgw config option subject_updates_title...
...see discussion
http://thread.gmane.org/gmane.comp.bug-tracking.roundup.user/10169
| author | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
|---|---|
| date | Wed, 04 Aug 2010 10:01:23 +0000 |
| parents | 18cc4323e2ad |
| children | f6a2bfd351ee |
comparison
equal
deleted
inserted
replaced
| 4402:abb7dbbf27ba | 4405:863ec554525c |
|---|---|
| 583 Roundup issue tracker <issue_tracker@your.tracker.email.domain.example> | 583 Roundup issue tracker <issue_tracker@your.tracker.email.domain.example> |
| 584 <http://tracker.example/cgi-bin/roundup.cgi/bugs/issue1> | 584 <http://tracker.example/cgi-bin/roundup.cgi/bugs/issue1> |
| 585 _______________________________________________________________________ | 585 _______________________________________________________________________ |
| 586 ''') | 586 ''') |
| 587 | 587 |
| 588 def testFollowupNoSubjectChange(self): | |
| 589 self.db.config.MAILGW_SUBJECT_UPDATES_TITLE = 'no' | |
| 590 self.doNewIssue() | |
| 591 | |
| 592 self._handle_mail('''Content-Type: text/plain; | |
| 593 charset="iso-8859-1" | |
| 594 From: richard <richard@test.test> | |
| 595 To: issue_tracker@your.tracker.email.domain.example | |
| 596 Message-Id: <followup_dummy_id> | |
| 597 In-Reply-To: <dummy_test_message_id> | |
| 598 Subject: [issue1] Wrzlbrmft... [assignedto=mary; nosy=+john] | |
| 599 | |
| 600 This is a followup | |
| 601 ''') | |
| 602 l = self.db.issue.get('1', 'nosy') | |
| 603 l.sort() | |
| 604 self.assertEqual(l, [self.chef_id, self.richard_id, self.mary_id, | |
| 605 self.john_id]) | |
| 606 | |
| 607 self.compareMessages(self._get_mail(), | |
| 608 '''FROM: roundup-admin@your.tracker.email.domain.example | |
| 609 TO: chef@bork.bork.bork, john@test.test, mary@test.test | |
| 610 Content-Type: text/plain; charset="utf-8" | |
| 611 Subject: [issue1] Testing... | |
| 612 To: chef@bork.bork.bork, john@test.test, mary@test.test | |
| 613 From: richard <issue_tracker@your.tracker.email.domain.example> | |
| 614 Reply-To: Roundup issue tracker | |
| 615 <issue_tracker@your.tracker.email.domain.example> | |
| 616 MIME-Version: 1.0 | |
| 617 Message-Id: <followup_dummy_id> | |
| 618 In-Reply-To: <dummy_test_message_id> | |
| 619 X-Roundup-Name: Roundup issue tracker | |
| 620 X-Roundup-Loop: hello | |
| 621 X-Roundup-Issue-Status: chatting | |
| 622 Content-Transfer-Encoding: quoted-printable | |
| 623 | |
| 624 | |
| 625 richard <richard@test.test> added the comment: | |
| 626 | |
| 627 This is a followup | |
| 628 | |
| 629 ---------- | |
| 630 assignedto: -> mary | |
| 631 nosy: +john, mary | |
| 632 status: unread -> chatting | |
| 633 | |
| 634 _______________________________________________________________________ | |
| 635 Roundup issue tracker <issue_tracker@your.tracker.email.domain.example> | |
| 636 <http://tracker.example/cgi-bin/roundup.cgi/bugs/issue1> | |
| 637 _______________________________________________________________________ | |
| 638 ''') | |
| 639 self.assertEqual(self.db.issue.get('1','title'), 'Testing...') | |
| 640 | |
| 641 def testFollowupExplicitSubjectChange(self): | |
| 642 self.doNewIssue() | |
| 643 | |
| 644 self._handle_mail('''Content-Type: text/plain; | |
| 645 charset="iso-8859-1" | |
| 646 From: richard <richard@test.test> | |
| 647 To: issue_tracker@your.tracker.email.domain.example | |
| 648 Message-Id: <followup_dummy_id> | |
| 649 In-Reply-To: <dummy_test_message_id> | |
| 650 Subject: [issue1] Wrzlbrmft... [assignedto=mary; nosy=+john; title=new title] | |
| 651 | |
| 652 This is a followup | |
| 653 ''') | |
| 654 l = self.db.issue.get('1', 'nosy') | |
| 655 l.sort() | |
| 656 self.assertEqual(l, [self.chef_id, self.richard_id, self.mary_id, | |
| 657 self.john_id]) | |
| 658 | |
| 659 self.compareMessages(self._get_mail(), | |
| 660 '''FROM: roundup-admin@your.tracker.email.domain.example | |
| 661 TO: chef@bork.bork.bork, john@test.test, mary@test.test | |
| 662 Content-Type: text/plain; charset="utf-8" | |
| 663 Subject: [issue1] new title | |
| 664 To: chef@bork.bork.bork, john@test.test, mary@test.test | |
| 665 From: richard <issue_tracker@your.tracker.email.domain.example> | |
| 666 Reply-To: Roundup issue tracker | |
| 667 <issue_tracker@your.tracker.email.domain.example> | |
| 668 MIME-Version: 1.0 | |
| 669 Message-Id: <followup_dummy_id> | |
| 670 In-Reply-To: <dummy_test_message_id> | |
| 671 X-Roundup-Name: Roundup issue tracker | |
| 672 X-Roundup-Loop: hello | |
| 673 X-Roundup-Issue-Status: chatting | |
| 674 Content-Transfer-Encoding: quoted-printable | |
| 675 | |
| 676 | |
| 677 richard <richard@test.test> added the comment: | |
| 678 | |
| 679 This is a followup | |
| 680 | |
| 681 ---------- | |
| 682 assignedto: -> mary | |
| 683 nosy: +john, mary | |
| 684 status: unread -> chatting | |
| 685 title: Testing... -> new title | |
| 686 | |
| 687 _______________________________________________________________________ | |
| 688 Roundup issue tracker <issue_tracker@your.tracker.email.domain.example> | |
| 689 <http://tracker.example/cgi-bin/roundup.cgi/bugs/issue1> | |
| 690 _______________________________________________________________________ | |
| 691 ''') | |
| 692 | |
| 588 def testNosyGeneration(self): | 693 def testNosyGeneration(self): |
| 589 self.db.issue.create(title='test') | 694 self.db.issue.create(title='test') |
| 590 | 695 |
| 591 # create a nosy message | 696 # create a nosy message |
| 592 msg = self.db.msg.create(content='This is a test', | 697 msg = self.db.msg.create(content='This is a test', |
