Mercurial > p > roundup > code
view test/test_mailer.py @ 4856:392a055fdc21
issue2117897: Fixed two more rounding to 60.0 seconds in date.py
This caused exceptions in real-world data as reported in the issue by
Kenny Johansson, Malte Helmert and me. Change them to 59.999 as was done
in the fix for issue2550802.
| author | Thomas Arendsen Hein <thomas@intevation.de> |
|---|---|
| date | Tue, 11 Feb 2014 09:38:31 +0100 |
| parents | 182d8c41a3aa |
| children | 364c54991861 |
line wrap: on
line source
#-*- encoding: utf8 -*- import unittest from roundup import mailer class EncodingTestCase(unittest.TestCase): def testEncoding(self): a = lambda n, a, c, o: self.assertEquals(mailer.nice_sender_header(n, a, c), o) a('ascii', 'ascii@test.com', 'iso8859-1', 'ascii <ascii@test.com>') a(u'café', 'ascii@test.com', 'iso8859-1', '=?iso8859-1?q?caf=E9?= <ascii@test.com>') a('as"ii', 'ascii@test.com', 'iso8859-1', '"as\\"ii" <ascii@test.com>') def test_suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(EncodingTestCase)) return suite if __name__ == '__main__': runner = unittest.TextTestRunner() unittest.main(testRunner=runner) # vim: set et sts=4 sw=4 :
