summaryrefslogtreecommitdiff
path: root/service/test/unit
diff options
context:
space:
mode:
authorFolker Bernitt <fbernitt@thoughtworks.com>2016-01-12 15:25:42 +0100
committerFolker Bernitt <fbernitt@thoughtworks.com>2016-01-12 15:25:42 +0100
commit5cf360add8cdbbdc4ca1c620d5c04a8af8956ace (patch)
treede1c6c869f217387f2e42a12047ca651ee4f278b /service/test/unit
parent342828fd818aa3212e0aed2ba79e0218e1274c6c (diff)
Refactor AttachmentInfo: Remove knowledge about part map structure
Diffstat (limited to 'service/test/unit')
-rw-r--r--service/test/unit/adapter/mailstore/test_leap_mail.py5
-rw-r--r--service/test/unit/adapter/mailstore/test_leap_mailstore.py2
2 files changed, 3 insertions, 4 deletions
diff --git a/service/test/unit/adapter/mailstore/test_leap_mail.py b/service/test/unit/adapter/mailstore/test_leap_mail.py
index 4b074082..91e960e1 100644
--- a/service/test/unit/adapter/mailstore/test_leap_mail.py
+++ b/service/test/unit/adapter/mailstore/test_leap_mail.py
@@ -85,9 +85,8 @@ class TestLeapMail(TestCase):
self.assertEqual(body, mail.as_dict()['body'])
def test_as_dict_with_attachments(self):
- mail = LeapMail('doc id', 'INBOX', attachments=[AttachmentInfo({'phash': 'id', 'ctype': 'text/plain', 'size': 2},
- {'Content-Description': 'name',
- 'Content-Transfer-Encoding': 'encoding'})])
+ attachment_info = AttachmentInfo('id', 'name', 'encoding', ctype='text/plain', size=2)
+ mail = LeapMail('doc id', 'INBOX', attachments=[attachment_info])
self.assertEqual([{'ident': 'id', 'name': 'name', 'encoding': 'encoding', 'content-type': 'text/plain', 'size': 2}],
mail.as_dict()['attachments'])
diff --git a/service/test/unit/adapter/mailstore/test_leap_mailstore.py b/service/test/unit/adapter/mailstore/test_leap_mailstore.py
index 1eae48df..0945e0c4 100644
--- a/service/test/unit/adapter/mailstore/test_leap_mailstore.py
+++ b/service/test/unit/adapter/mailstore/test_leap_mailstore.py
@@ -37,7 +37,7 @@ import pkg_resources
from leap.mail.mail import Message
from pixelated.adapter.mailstore import underscore_uuid
-from pixelated.adapter.mailstore.leap_mailstore import LeapMailStore, LeapMail, AttachmentInfo
+from pixelated.adapter.mailstore.leap_mailstore import LeapMailStore, LeapMail
class TestLeapMailStore(TestCase):