comparison test/test_mailgw.py @ 4505:a00e0e73bb26

Yet another fix to the mail gateway... ...messages got *all* files of an issue, not just the new ones. Thanks to Rafal Bisingier for reporting and proposing a fix. The regression test was updated. Fix version numbers in upgrade documentation, the file-unlink defect was in 1.4.17 not 1.4.16. Thanks to Rafal Bisingier.
author Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
date Mon, 06 Jun 2011 20:00:17 +0000
parents 9f488541802f
children ddff9669361b
comparison
equal deleted inserted replaced
4504:cd8ff13cbc5a 4505:a00e0e73bb26
1821 m = set(self.db.user.list()) 1821 m = set(self.db.user.list())
1822 new = list(m - l)[0] 1822 new = list(m - l)[0]
1823 name = self.db.user.get(new, 'realname') 1823 name = self.db.user.get(new, 'realname')
1824 self.assertEquals(name, 'H€llo') 1824 self.assertEquals(name, 'H€llo')
1825 1825
1826 def testNewUserAuthorMixedEncodedName(self):
1827 l = set(self.db.user.list())
1828 # From: name has Euro symbol in it
1829 message = '''Content-Type: text/plain;
1830 charset="iso-8859-1"
1831 From: Firstname =?utf-8?b?w6TDtsOf?= Last <fubar@bork.bork.bork>
1832 To: issue_tracker@your.tracker.email.domain.example
1833 Message-Id: <dummy_test_message_id>
1834 Subject: [issue] Test =?utf-8?b?w4TDlsOc?= umlauts
1835 X1
1836 X2
1837
1838 This is a test submission of a new issue.
1839 '''
1840 p = [
1841 self.db.security.getPermission('Register', 'user'),
1842 self.db.security.getPermission('Email Access', None),
1843 self.db.security.getPermission('Create', 'issue'),
1844 self.db.security.getPermission('Create', 'msg'),
1845 ]
1846 self.db.security.role['anonymous'].permissions = p
1847 self._handle_mail(message)
1848 title = self.db.issue.get('1', 'title')
1849 self.assertEquals(title, 'Test \xc3\x84\xc3\x96\xc3\x9c umlauts X1 X2')
1850 m = set(self.db.user.list())
1851 new = list(m - l)[0]
1852 name = self.db.user.get(new, 'realname')
1853 self.assertEquals(name, 'Firstname \xc3\xa4\xc3\xb6\xc3\x9f Last')
1854
1826 def testUnknownUser(self): 1855 def testUnknownUser(self):
1827 l = set(self.db.user.list()) 1856 l = set(self.db.user.list())
1828 message = '''Content-Type: text/plain; 1857 message = '''Content-Type: text/plain;
1829 charset="iso-8859-1" 1858 charset="iso-8859-1"
1830 From: Nonexisting User <nonexisting@bork.bork.bork> 1859 From: Nonexisting User <nonexisting@bork.bork.bork>

Roundup Issue Tracker: http://roundup-tracker.org/