summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFolker Bernitt <fbernitt@thoughtworks.com>2015-08-05 11:30:15 +0200
committerFolker Bernitt <fbernitt@thoughtworks.com>2015-08-11 17:00:32 +0200
commit01eb608247e99785edef67cffdd03374073a7f5f (patch)
treeb2ad8e2576df2fe314212813305d24e90cf265a0
parent908eaede72f0fd6daa8c9b1522e2b60095718623 (diff)
Fixed LeapMailStore integration test.
- ensured INBOX exists
-rw-r--r--service/test/support/integration/soledad_test_base.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/service/test/support/integration/soledad_test_base.py b/service/test/support/integration/soledad_test_base.py
index 1e3e3094..1a2645d1 100644
--- a/service/test/support/integration/soledad_test_base.py
+++ b/service/test/support/integration/soledad_test_base.py
@@ -43,13 +43,14 @@ class SoledadTestBase(unittest.TestCase, AppTestClient):
@defer.inlineCallbacks
def _create_mail_in_soledad(self, mail):
- message = self._convert_mail_to_leap_message(mail)
yield self.adaptor.initialize_store(self.soledad)
+ mbox = yield self.adaptor.get_or_create_mbox(self.soledad, 'INBOX')
+ message = self._convert_mail_to_leap_message(mail, mbox.uuid)
yield self.adaptor.create_msg(self.soledad, message)
defer.returnValue(message.get_wrapper().mdoc.doc_id)
- def _convert_mail_to_leap_message(self, mail):
+ def _convert_mail_to_leap_message(self, mail, mbox_uuid):
message = self.adaptor.get_msg_from_string(Message, mail.as_string())
- message.get_wrapper().set_mbox_uuid(self.mbox_uuid)
+ message.get_wrapper().set_mbox_uuid(mbox_uuid)
return message