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

Delete attachments after they are no longer referenced by an e-mail message. Fixes #1. Bumping version number to 1.8.3

This commit is contained in:
Adam Coddington 2013-02-03 14:52:42 -08:00
parent 83584af2e0
commit ee6b4b3e1d
3 changed files with 15 additions and 6 deletions

View file

@ -5,7 +5,7 @@ import shutil
from django.db import models
from django.test import TestCase
from django_mailbox.models import Mailbox
from django_mailbox.models import Mailbox, Message
class TestProcessMessage(TestCase):
def _get_email_object(self, name):
@ -15,10 +15,8 @@ class TestProcessMessage(TestCase):
)
def tearDown(self):
try:
shutil.rmtree('mailbox_attachments')
except OSError:
pass
for message in Message.objects.all():
message.delete()
def test_message_without_attachments(self):
message = self._get_email_object('generic_message.eml')