@@ -0,0 +1,2052 @@
+from email2slack import EmailParser%0A%0A%0Adef test_text_email():%0A    email = %22%22%22Return-Path: %3Ctest_from@test%3E%0AX-Original-To: test_to@test%0ADelivered-To: test_to@test%0AFrom: test_from@test%0ASubject: subject_test%0ATo: test_to@test%0ADate: Sat, 12 Nov 2016 23:37:27 +0900 (JST)%0A%0Amessage_test%22%22%22%0A%0A    assert EmailParser.parse(email) == %7B%0A        'From': 'test_from@test',%0A        'To': 'test_to@test',%0A        'Subject': 'subject_test',%0A        'body-plain': 'message_test',%0A        'body-html': None%0A    %7D%0A%0A%0Adef test_text_email_abnormal():%0A    email = %22%22%22Return-Path: %3Ctest_from@test%3E%0AX-Original-To: test_to@test%0ADelivered-To: test_to@test%0A%0Amessage_test%22%22%22%0A%0A    assert EmailParser.parse(email) == %7B%0A        'From': '',%0A        'To': '',%0A        'Subject': '',%0A        'body-plain': 'message_test',%0A        'body-html': None%0A    %7D%0A%0A%0Adef test_text_email_utf8():%0A    email = %22%22%22Return-Path: %3Ctest_from@test%3E%0AX-Original-To: test_to@test%0ADelivered-To: test_to@test%0AFrom: test_from@test%0ASubject: =?UTF-8?B?8J+RgfCfkJ1N?=%0ATo: test_to@test%0AContent-Type: text/plain; charset=UTF-8%0AContent-Transfer-Encoding: base64%0A%0A8J+QjQ0K%22%22%22%0A%0A    assert EmailParser.parse(email) == %7B%0A        'From': 'test_from@test',%0A        'To': 'test_to@test',%0A        'Subject': '%F0%9F%91%81%F0%9F%90%9DM',%0A        'body-plain': '%F0%9F%90%8D%5Cr%5Cn',%0A        'body-html': None%0A    %7D%0A%0A%0Adef test_html_email():%0A    email = %22%22%22Return-Path: %3Ctest_from@test%3E%0AX-Original-To: test_to@test%0ADelivered-To: test_to@test%0AFrom: test_from@test%0ASubject: subject_test%0ATo: test_to@test%0ADate: Sat, 12 Nov 2016 23:37:27 +0900 (JST)%0AContent-Type: multipart/alternative; boundary=94eb2c14a07ea8d44d05411b334d%0A%0A--94eb2c14a07ea8d44d05411b334d%0AContent-Type: text/plain; charset=UTF-8%0A%0Amessage_test%0A%0A--94eb2c14a07ea8d44d05411b334d%0AContent-Type: text/html; charset=UTF-8%0A%0A%3Cb%3Emessage_test%3C/b%3E%0A%0A--94eb2c14a07ea8d44d05411b334d--%22%22%22%0A%0A    assert EmailParser.parse(email) == %7B%0A        'From': 'test_from@test',%0A        'To': 'test_to@test',%0A        'Subject': 'subject_test',%0A        'body-plain': 'message_test%5Cn',%0A        'body-html': '%3Cb%3Emessage_test%3C/b%3E%5Cn'%0A    %7D%0A

add test for EmailParser