From 4cb47c1848bb5d20b5ae167a7ab2879d00825f84 Mon Sep 17 00:00:00 2001 From: NavaL Date: Tue, 22 Dec 2015 18:16:17 +0100 Subject: decode to base64 the raw attachment that is in bytes... and renaming id to attachment_id in the mail POST Issue #548 --- service/test/unit/adapter/test_mail.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'service/test/unit/adapter') diff --git a/service/test/unit/adapter/test_mail.py b/service/test/unit/adapter/test_mail.py index 006bde77..4a36bd42 100644 --- a/service/test/unit/adapter/test_mail.py +++ b/service/test/unit/adapter/test_mail.py @@ -149,8 +149,8 @@ class InputMailTest(unittest.TestCase): mail = MIMEMultipart() mail.attach(attachment) - part_one = 'Content-Type: text/plain; Content-Disposition="attachment; filename=ayoyo.txt"\nMIME-Version: 1.0\n\nHamburg Ayoyoyooooo!!!' - part_two = 'Content-Type: text/html; Content-Disposition="attachment; filename=hello.html"\nMIME-Version: 1.0\n\n

Hello html Hamburg!

' + part_one = 'Content-Type: text/plain\nMIME-Version: 1.0\nContent-Disposition: attachment; filename="ayoyo.txt"\nContent-Transfer-Encoding: base64\n\n' + part_two = 'Content-Type: text/html\nMIME-Version: 1.0\nContent-Disposition: attachment; filename="hello.html"\nContent-Transfer-Encoding: base64\n\n' self.assertRegexpMatches(input_mail.raw, part_one) self.assertRegexpMatches(input_mail.raw, part_two) -- cgit v1.2.3