summaryrefslogtreecommitdiff
path: root/Mailman/testing/test_handlers.py
diff options
context:
space:
mode:
authortkikuchi2007-03-24 05:17:00 +0000
committertkikuchi2007-03-24 05:17:00 +0000
commit8b83e896dfdbf349190fc9e70a258221907b7a84 (patch)
tree56a19a5da94240bfff5f0e91c67b381e4f97b24a /Mailman/testing/test_handlers.py
parentcd3c500449c1c4d0ff7a9e1710c3bedd81c6a804 (diff)
downloadmailman-8b83e896dfdbf349190fc9e70a258221907b7a84.tar.gz
mailman-8b83e896dfdbf349190fc9e70a258221907b7a84.tar.zst
mailman-8b83e896dfdbf349190fc9e70a258221907b7a84.zip
Diffstat (limited to 'Mailman/testing/test_handlers.py')
-rw-r--r--Mailman/testing/test_handlers.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/Mailman/testing/test_handlers.py b/Mailman/testing/test_handlers.py
index 64a6e409b..931a7ca44 100644
--- a/Mailman/testing/test_handlers.py
+++ b/Mailman/testing/test_handlers.py
@@ -1606,6 +1606,41 @@ Here is message %(i)d
# BAW: this test is incomplete...
+ def test_send_i18n_digest(self):
+ eq = self.assertEqual
+ mlist = self._mlist
+ mlist.preferred_language = 'fr'
+ msg = email.message_from_string("""\
+From: aperson@example.org
+To: _xtest@example.com
+Subject: =?iso-2022-jp?b?GyRCMGxIVhsoQg==?=
+MIME-Version: 1.0
+Content-Type: text/plain; charset=iso-2022-jp
+Content-Transfer-Encoding: 7bit
+
+\x1b$B0lHV\x1b(B
+""")
+ mlist.digest_size_threshhold = 0
+ ToDigest.process(mlist, msg, {})
+ files = self._sb.files()
+ eq(len(files), 2)
+ for filebase in files:
+ qmsg, qdata = self._sb.dequeue(filebase)
+ if qmsg.get_content_maintype() == 'multipart':
+ mimemsg = qmsg
+ mimedata = qdata
+ else:
+ rfc1153msg = qmsg
+ rfc1153data = qdata
+ eq(rfc1153msg.get_content_type(), 'text/plain')
+ eq(rfc1153msg.get_content_charset(), 'utf-8')
+ eq(rfc1153msg['content-transfer-encoding'], 'base64')
+ toc = mimemsg.get_payload()[1]
+ eq(toc.get_content_type(), 'text/plain')
+ eq(toc.get_content_charset(), 'utf-8')
+ eq(toc['content-transfer-encoding'], 'base64')
+
+
class TestToOutgoing(TestBase):
def setUp(self):