Mercurial > p > roundup > code
view test/test_mailer.py @ 4540:bf67fed13ef9
Fix PGP implementation
The pyme API has changed significantly since this worked (API is now
better). Add regression-test for PGP support (this isn't run if pyme
isn't installed). We're testing only reception of a signed message for
now.
| author | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
|---|---|
| date | Thu, 06 Oct 2011 21:02:09 +0000 |
| 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 :
