forked from mirror/django-mailbox
Always store payload parts having a Content-Disposition of 'attachment' as attachments, even if their Content-Type is text/plain. Fixes #52.
Squashed commit of the following: commit5bcbac33d6Author: Adam Coddington <me@adamcoddington.net> Date: Tue Jul 7 23:05:15 2015 -0700 Add handling for situations in which the message was deleted in another thread before processing. commit6183f68b39Author: Adam Coddington <me@adamcoddington.net> Date: Tue Jul 7 22:58:15 2015 -0700 Always store message as attachment if its content-disposition is marked as such. commit4c16494b1aAuthor: Adam Coddington <me@adamcoddington.net> Date: Tue Jul 7 22:46:52 2015 -0700 Adding a (hopefully) failing test case for #52.
This commit is contained in:
parent
95f4d5c7ff
commit
ff433a24f4
4 changed files with 53 additions and 2 deletions
|
|
@ -230,3 +230,12 @@ class TestProcessEmail(EmailMessageTestCase):
|
|||
second_reply_msg = msg.reply(reply_email_object)
|
||||
|
||||
self.assertEqual(self.mailbox.from_email, second_reply_msg.from_header)
|
||||
|
||||
def test_message_with_text_attachment(self):
|
||||
email_object = self._get_email_object(
|
||||
'message_with_text_attachment.eml',
|
||||
)
|
||||
|
||||
msg = self.mailbox.process_incoming_message(email_object)
|
||||
|
||||
self.assertEqual(msg.attachments.all().count(), 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue