From 61ba137986f5830abedd22d42ec3a3bb28c0abf0 Mon Sep 17 00:00:00 2001 From: Felix Hammerl Date: Fri, 17 Jun 2016 14:34:22 +0200 Subject: Issue #608: Add unit test for case-specific lookup --- service/test/integration/test_leap_mailstore.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'service/test/integration') diff --git a/service/test/integration/test_leap_mailstore.py b/service/test/integration/test_leap_mailstore.py index 383ad6ea..c3d7b043 100644 --- a/service/test/integration/test_leap_mailstore.py +++ b/service/test/integration/test_leap_mailstore.py @@ -38,6 +38,18 @@ class LeapMailStoreTest(SoledadTestBase): self.assertIsNotNone(result) self.assertEqual(expected_mail_dict, result.as_dict()) + @defer.inlineCallbacks + def test_get_mail_with_lowercase_attachment(self): + input_mail = MIMEMultipart() + input_mail.attach(MIMEText(u'a utf8 message', _charset='utf-8')) + attachment = MIMEApplication('pretend to be binary attachment data') + attachment.add_header('content-disposition', 'attachment', filename='filename.txt') + input_mail.attach(attachment) + + mail = yield self.mail_store.add_mail('INBOX', input_mail.as_string()) + fetched_mail = yield self.mail_store.get_mail(mail.ident, include_body=True) + self.assertTrue(fetched_mail.as_dict()['attachments']) + @defer.inlineCallbacks def test_get_mail_with_attachment(self): input_mail = MIMEMultipart() -- cgit v1.2.3