split_emails function added, test added

This commit is contained in:
smitcona
2016-11-21 12:35:36 +00:00
parent 2444ba87c0
commit adfed748ce
2 changed files with 63 additions and 0 deletions

View File

@@ -696,3 +696,23 @@ def test_standard_replies():
"'%(reply)s' != %(stripped)s for %(fn)s" % \
{'reply': reply_text, 'stripped': stripped_text,
'fn': filename}
def test_split_email():
msg = """From: Mr. X
Date: 24 February 2016
To: Mr. Y
Subject: Hi
Attachments: none
Goodbye.
From: Mr. Y
To: Mr. X
Date: 24 February 2016
Subject: Hi
Attachments: none
Hello.
"""
expected_markers = "stttttsttttet"
markers = quotations.split_emails(msg)
eq_(markers, expected_markers)