Skip to content

Commit

Permalink
Removed unused test.
Browse files Browse the repository at this point in the history
  • Loading branch information
selwin committed May 21, 2015
1 parent afa559c commit 3a6a3ad
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions post_office/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,22 +282,3 @@ def test_attachments_email_message(self):

self.assertEqual(message.attachments,
[('test.txt', b'test file content', None)])

@override_settings(EMAIL_BACKEND='django.core.mail.backends.locmem.EmailBackend')
def test_dispatch_with_attachments(self):
email = Email.objects.create(to=['to@example.com'],
from_email='from@example.com', status=STATUS.queued,
subject='Subject', message='message')

attachment = Attachment()
attachment.file.save(
'test.txt', content=ContentFile('test file content'), save=True
)
email.attachments.add(attachment)

_send_bulk([email])

self.assertEqual(len(mail.outbox), 1)
self.assertEqual(mail.outbox[0].subject, 'Subject')
self.assertEqual(mail.outbox[0].attachments,
[('test.txt', b'test file content', None)])

0 comments on commit 3a6a3ad

Please sign in to comment.