diff options
author | Folker Bernitt <fbernitt@thoughtworks.com> | 2015-08-10 19:23:18 +0200 |
---|---|---|
committer | Folker Bernitt <fbernitt@thoughtworks.com> | 2015-08-11 17:00:34 +0200 |
commit | 9ed58715616f5c6341d32c9b0316933d3f2b4a3e (patch) | |
tree | b6196bfce3bff26228afb942f75083b5f8fd9bcd /service/test/integration | |
parent | c00e4115f5bd205a0f65224dccd5e889e7cbf3b8 (diff) |
Added test to ensure mail with same content can be added.
- as long as each one has a unique message id
Diffstat (limited to 'service/test/integration')
-rw-r--r-- | service/test/integration/test_leap_mailstore.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/service/test/integration/test_leap_mailstore.py b/service/test/integration/test_leap_mailstore.py index 61bb3e42..48764194 100644 --- a/service/test/integration/test_leap_mailstore.py +++ b/service/test/integration/test_leap_mailstore.py @@ -70,6 +70,19 @@ class LeapMailStoreTest(SoledadTestBase): self.assertIsNone(deleted_msg) @defer.inlineCallbacks + def test_add_add_mail_twice(self): + yield self.adaptor.initialize_store(self.soledad) + mail = load_mail_from_file('mbox00000000', enforceUniqueMessageId=True) + mail2 = load_mail_from_file('mbox00000000', enforceUniqueMessageId=True) + yield self.mail_store.add_mailbox('INBOX') + + msg1 = yield self.mail_store.add_mail('INBOX', mail.as_string()) + msg2 = yield self.mail_store.add_mail('INBOX', mail2.as_string()) + + self.assertIsNotNone(msg1.ident) + self.assertIsNotNone(msg2.ident) + + @defer.inlineCallbacks def test_get_mailbox_mail_ids(self): mail = load_mail_from_file('mbox00000000') yield self.mail_store.add_mailbox('INBOX') |