Mercurial > p > roundup > code
comparison test/test_mailgw.py @ 1550:905f92b97d4e maint-0.5
backport of mail address case problem from HEAD
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 24 Mar 2003 04:53:15 +0000 |
| parents | 3a853f1c20b5 |
| children |
comparison
equal
deleted
inserted
replaced
| 1541:a61ca144d3a4 | 1550:905f92b97d4e |
|---|---|
| 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.37.2.1 2003-02-06 05:44:49 richard Exp $ | 11 # $Id: test_mailgw.py,v 1.37.2.2 2003-03-24 04:53:15 richard Exp $ |
| 12 | 12 |
| 13 import unittest, cStringIO, tempfile, os, shutil, errno, imp, sys, difflib | 13 import unittest, cStringIO, tempfile, os, shutil, errno, imp, sys, difflib |
| 14 | 14 |
| 15 # Note: Should parse emails according to RFC2822 instead of performing a | 15 # Note: Should parse emails according to RFC2822 instead of performing a |
| 16 # literal string comparision. Parsing the messages allows the tests to work for | 16 # literal string comparision. Parsing the messages allows the tests to work for |
| 120 | 120 |
| 121 def testNewIssueNosy(self): | 121 def testNewIssueNosy(self): |
| 122 self.instance.config.ADD_AUTHOR_TO_NOSY = 'yes' | 122 self.instance.config.ADD_AUTHOR_TO_NOSY = 'yes' |
| 123 message = cStringIO.StringIO('''Content-Type: text/plain; | 123 message = cStringIO.StringIO('''Content-Type: text/plain; |
| 124 charset="iso-8859-1" | 124 charset="iso-8859-1" |
| 125 From: Chef <chef@bork.bork.bork> | 125 From: Chef <Chef@bork.bork.bork> |
| 126 To: issue_tracker@your.tracker.email.domain.example | 126 To: issue_tracker@your.tracker.email.domain.example |
| 127 Cc: richard@test | 127 Cc: richard@test |
| 128 Message-Id: <dummy_test_message_id> | 128 Message-Id: <dummy_test_message_id> |
| 129 Subject: [issue] Testing... | 129 Subject: [issue] Testing... |
| 130 | 130 |
| 141 self.assertEqual(l, ['3', '4']) | 141 self.assertEqual(l, ['3', '4']) |
| 142 | 142 |
| 143 def testAlternateAddress(self): | 143 def testAlternateAddress(self): |
| 144 message = cStringIO.StringIO('''Content-Type: text/plain; | 144 message = cStringIO.StringIO('''Content-Type: text/plain; |
| 145 charset="iso-8859-1" | 145 charset="iso-8859-1" |
| 146 From: John Doe <john.doe@test> | 146 From: john doe <John.Doe@test> |
| 147 To: issue_tracker@your.tracker.email.domain.example | 147 To: issue_tracker@your.tracker.email.domain.example |
| 148 Message-Id: <dummy_test_message_id> | 148 Message-Id: <dummy_test_message_id> |
| 149 Subject: [issue] Testing... | 149 Subject: [issue] Testing... |
| 150 | 150 |
| 151 This is a test submission of a new issue. | 151 This is a test submission of a new issue. |
