diff options
author | Folker Bernitt <fbernitt@thoughtworks.com> | 2015-07-27 17:27:24 +0200 |
---|---|---|
committer | Folker Bernitt <fbernitt@thoughtworks.com> | 2015-08-11 17:00:28 +0200 |
commit | 6d72d76f7753004c84d1a0eed6667b551c11b626 (patch) | |
tree | c66c8973389cd4b00a5356b87c5024e49aa7d30f /service/test/support/integration | |
parent | bf96b1077bdd777400a40fc2fe3acc83552d70de (diff) |
Added add mailbox and add message behaviour.
- Add message does not yet mail index
Diffstat (limited to 'service/test/support/integration')
-rw-r--r-- | service/test/support/integration/app_test_client.py | 10 | ||||
-rw-r--r-- | service/test/support/integration/soledad_test_base.py | 1 |
2 files changed, 9 insertions, 2 deletions
diff --git a/service/test/support/integration/app_test_client.py b/service/test/support/integration/app_test_client.py index da237284..67cd9df0 100644 --- a/service/test/support/integration/app_test_client.py +++ b/service/test/support/integration/app_test_client.py @@ -15,6 +15,7 @@ # along with Pixelated. If not, see <http://www.gnu.org/licenses/>. import json import multiprocessing +from leap.mail.adaptors.soledad import SoledadMailAdaptor from mockito import mock import os import shutil @@ -61,7 +62,8 @@ class AppTestClient(object): PixelatedMail.from_email_address = self.MAIL_ADDRESS - self.soledad = initialize_soledad(tempdir=soledad_test_folder) + self.soledad = yield initialize_soledad(tempdir=soledad_test_folder) + self.soledad_querier = self._create_soledad_querier(self.soledad, self.INDEX_KEY) self.keymanager = mock() @@ -225,6 +227,7 @@ class AppTestClient(object): return res +@defer.inlineCallbacks def initialize_soledad(tempdir): if os.path.isdir(tempdir): shutil.rmtree(tempdir) @@ -257,4 +260,7 @@ def initialize_soledad(tempdir): cert_file, defer_encryption=False, syncable=False) - return _soledad + + yield SoledadMailAdaptor().initialize_store(_soledad) + + defer.returnValue(_soledad) diff --git a/service/test/support/integration/soledad_test_base.py b/service/test/support/integration/soledad_test_base.py index 979b1f96..2ebd6749 100644 --- a/service/test/support/integration/soledad_test_base.py +++ b/service/test/support/integration/soledad_test_base.py @@ -13,6 +13,7 @@ # # You should have received a copy of the GNU Affero General Public License # along with Pixelated. If not, see <http://www.gnu.org/licenses/>. +from twisted.internet import defer from twisted.trial import unittest from test.support.integration.app_test_client import AppTestClient |