view test/test_mailer.py @ 6754:bb04638dc78d

Test _generic.item.html to mke sure submit button displayed properly Login as admin and new fred user. Admin user should see submit button when viewing /status7. User fred should not see it. Both should see the word 'done-cbb' which is the name of status7. Chose that since done-cbb is unliely to occur naturally while unread (name of /status1) could occur by chance in the future.
author John Rouillard <rouilj@ieee.org>
date Tue, 05 Jul 2022 00:36:22 -0400
parents 95a366d46065
children
line wrap: on
line source

#-*- encoding: utf-8 -*-
import unittest

from roundup import mailer

class EncodingTestCase(unittest.TestCase):
    def testEncoding(self):
        a = lambda n, a, c, o: self.assertEqual(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(u'café', 'ascii@test.com', 'utf-8',
            '=?utf-8?b?Y2Fmw6k=?= <ascii@test.com>')
        a('as"ii', 'ascii@test.com', 'iso8859-1', '"as\\"ii" <ascii@test.com>')

# vim: set et sts=4 sw=4 :

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