summaryrefslogtreecommitdiff
path: root/service/test/unit
diff options
context:
space:
mode:
authorFolker Bernitt <fbernitt@thoughtworks.com>2015-08-06 13:25:30 +0200
committerFolker Bernitt <fbernitt@thoughtworks.com>2015-08-11 17:00:33 +0200
commit08497951fa9aed8d28be8b2dea1aef2135f56769 (patch)
tree2c11b8c3cc71b47db62fa3cb4dce9dbe3ed22292 /service/test/unit
parentce86deeed4d4e408ddad294beec7952601345025 (diff)
Made LeapMail compatible with SearchEngine.
Diffstat (limited to 'service/test/unit')
-rw-r--r--service/test/unit/adapter/mailstore/test_leap_mailstore.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/service/test/unit/adapter/mailstore/test_leap_mailstore.py b/service/test/unit/adapter/mailstore/test_leap_mailstore.py
index ed5fce84..4565cc6d 100644
--- a/service/test/unit/adapter/mailstore/test_leap_mailstore.py
+++ b/service/test/unit/adapter/mailstore/test_leap_mailstore.py
@@ -64,6 +64,15 @@ class TestLeapMail(TestCase):
self.assertEqual(body, mail.as_dict()['body'])
+ def test_raw_constructed_by_headers_and_body(self):
+ body = 'some body content'
+ mail = LeapMail('doc id', 'INBOX', {'From': 'test@example.test', 'Subject': 'A test Mail', 'To': 'receiver@example.test'}, ('foo', 'bar'), body=body)
+
+ result = mail.raw
+
+ expected_raw = 'To: receiver@example.test\nFrom: test@example.test\nSubject: A test Mail\n\nsome body content'
+ self.assertEqual(expected_raw, result)
+
class TestLeapMailStore(TestCase):
def setUp(self):