1
0
Fork 1
mirror of https://github.com/coddingtonbear/django-mailbox.git synced 2026-07-09 22:38:19 +02:00

Refactored the imap transport based on the tests

Testing the switch to uid-based IMAP calls required better testing
The better testing revealed some code that wasn't so pretty

I fixed the tests and the code
This commit is contained in:
Alex Lovell-Troy 2014-05-29 23:41:11 -06:00
parent b2abec1d40
commit ec18a01880
3 changed files with 88 additions and 88 deletions

View file

@ -8,6 +8,16 @@ from django.test import TestCase
from django_mailbox import models
from django_mailbox.models import Mailbox, Message
def get_email_as_text(name):
with open(
os.path.join(
os.path.dirname(__file__),
'messages',
name,
),
'rb'
) as f:
return f.read()
class EmailMessageTestCase(TestCase):
ALLOWED_EXTRA_HEADERS = [