summaryrefslogtreecommitdiff
path: root/service/test
diff options
context:
space:
mode:
authorFolker Bernitt <fbernitt@thoughtworks.com>2014-12-03 15:26:15 +0100
committerFolker Bernitt <fbernitt@thoughtworks.com>2014-12-03 15:26:15 +0100
commitf4b0accddbfda5a21a68d46b1d95998266647a55 (patch)
tree458bc84de50ec98c9acb2f2480a8a0c127d5de33 /service/test
parent81140d851bed8c1c90f739510ff059db698b4f79 (diff)
Fixed handling of mails with non us-ascii body.
Diffstat (limited to 'service/test')
-rw-r--r--service/test/unit/adapter/mail_test.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/service/test/unit/adapter/mail_test.py b/service/test/unit/adapter/mail_test.py
index 4ce398b8..e0879b44 100644
--- a/service/test/unit/adapter/mail_test.py
+++ b/service/test/unit/adapter/mail_test.py
@@ -126,6 +126,14 @@ class TestPixelatedMail(unittest.TestCase):
self.assertNotIn(',', address)
self.assertEquals(4, len(mail.headers[header_label]))
+ def test_content_type_is_read_from_headers_for_plain_mail_when_converted_to_raw(self):
+ fdoc, hdoc, bdoc = test_helper.leap_mail(flags=['\\Recent'], body=u'some umlaut \xc3', extra_headers={'Content-Type': 'text/plain; charset=ISO-8859-1'})
+ hdoc.content['headers']['Subject'] = 'The subject'
+ hdoc.content['headers']['From'] = 'me@pixelated.org'
+ mail = PixelatedMail.from_soledad(fdoc, hdoc, bdoc, soledad_querier=self.querier)
+
+ mail.raw
+
class InputMailTest(unittest.TestCase):
mail_dict = lambda x: {