Mercurial > p > roundup > code
view test/test_mailer.py @ 4678:23de24f57566
issue2550749 - the xmlrpc interface is invoked on content type
and not url path. Sending any text/xml data to roundup results in
invoking the xml-rpc interface, but a REST or other interface could
also consume xml data and do something different. So require the use
of 'http(s)://.../xmlrpc' uri to trigger the xmlrpc interface.
| author | rouilj |
|---|---|
| date | Sun, 25 Nov 2012 18:24:28 -0500 |
| 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 :
