From 30d3d281d0f5d8598f4d36fde08f2b12da55f711 Mon Sep 17 00:00:00 2001 From: Patrick Maia Date: Wed, 29 Oct 2014 10:39:06 -0300 Subject: Card #30 - adds attachment information on mail response --- service/pixelated/adapter/mail.py | 3 ++- service/test/unit/adapter/mail_test.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/service/pixelated/adapter/mail.py b/service/pixelated/adapter/mail.py index 24ee797d..52a0a2e8 100644 --- a/service/pixelated/adapter/mail.py +++ b/service/pixelated/adapter/mail.py @@ -81,7 +81,8 @@ class Mail: 'status': list(self.status), 'security_casing': {}, 'body': self.body, - 'mailbox': self.mailbox_name.lower() + 'mailbox': self.mailbox_name.lower(), + 'attachments': self.parts['attachments'] if self.parts else [] } diff --git a/service/test/unit/adapter/mail_test.py b/service/test/unit/adapter/mail_test.py index 8b35b181..00a05b4a 100644 --- a/service/test/unit/adapter/mail_test.py +++ b/service/test/unit/adapter/mail_test.py @@ -87,7 +87,8 @@ class TestPixelatedMail(unittest.TestCase): 'mailbox': 'inbox', 'security_casing': {}, 'status': ['recent'], - 'tags': [] + 'tags': [], + 'attachments': [] }) def test_alternatives_body(self): -- cgit v1.2.3