1
0
Fork 1
mirror of https://github.com/coddingtonbear/django-mailbox.git synced 2026-07-10 06:48:19 +02:00

Add tests case for text content with text attachment

This commit is contained in:
Adam Dobrawy 2018-02-07 21:09:29 +01:00
parent dfad0f8f9c
commit 4100f2ea62

View file

@ -401,6 +401,7 @@ class TestProcessEmail(EmailMessageTestCase):
msg = self.mailbox.process_incoming_message(email_object) msg = self.mailbox.process_incoming_message(email_object)
self.assertEqual(msg.attachments.all().count(), 1) self.assertEqual(msg.attachments.all().count(), 1)
self.assertNotIn('This is an attachment.', msg.text)
def test_message_with_long_content(self): def test_message_with_long_content(self):
email_object = self._get_email_object( email_object = self._get_email_object(
@ -468,4 +469,4 @@ class TestProcessEmail(EmailMessageTestCase):
with gzip.open(msg.eml.name, 'rb') as f: with gzip.open(msg.eml.name, 'rb') as f:
self.assertEqual(f.read(), self.assertEqual(f.read(),
self._get_email_as_text('generic_message.eml')) self._get_email_as_text('generic_message.eml'))