summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/mail
diff options
context:
space:
mode:
authordrebs <drebs@riseup.net>2017-02-23 19:31:30 -0300
committerKali Kaneko (leap communications) <kali@leap.se>2017-02-27 20:55:01 +0100
commit06e8b6f6b0b758866c053762be4716d7050c1943 (patch)
treec9b808d36404ffff496fb5dfde1eefcf850ba91f /src/leap/bitmask/mail
parentefced3ee9e227f30078503ed2584dbbe6f4615e1 (diff)
[refactor] use new soledad client parameter
- Resolves: #8721
Diffstat (limited to 'src/leap/bitmask/mail')
-rw-r--r--src/leap/bitmask/mail/imap/service/imap-server.tac5
-rw-r--r--src/leap/bitmask/mail/testing/__init__.py14
-rw-r--r--src/leap/bitmask/mail/testing/common.py2
3 files changed, 4 insertions, 17 deletions
diff --git a/src/leap/bitmask/mail/imap/service/imap-server.tac b/src/leap/bitmask/mail/imap/service/imap-server.tac
index 94601982..a5c390f3 100644
--- a/src/leap/bitmask/mail/imap/service/imap-server.tac
+++ b/src/leap/bitmask/mail/imap/service/imap-server.tac
@@ -42,7 +42,6 @@ from leap.bitmask.mail.imap.service import LeapIMAPFactory
from leap.soledad.client import Soledad
-
# TODO should get this initializers from some authoritative mocked source
# We might want to put them the soledad itself.
@@ -67,7 +66,7 @@ def initialize_soledad(uuid, email, passwd,
localdb,
server_url,
cert_file,
- syncable=False)
+ offline=True)
return soledad
@@ -121,7 +120,7 @@ km_args = (userid, "https://localhost", soledad)
km_kwargs = {
"token": "",
"ca_cert_path": "",
- "api_uri": "",
+ "api_uri": "",
"api_version": "",
"uid": uuid,
"gpgbinary": get_gpg_bin_path()
diff --git a/src/leap/bitmask/mail/testing/__init__.py b/src/leap/bitmask/mail/testing/__init__.py
index afb8e437..54aaa87a 100644
--- a/src/leap/bitmask/mail/testing/__init__.py
+++ b/src/leap/bitmask/mail/testing/__init__.py
@@ -17,8 +17,6 @@
"""
Base classes and keys for leap.mail tests.
"""
-import os
-import distutils.spawn
from mock import Mock
from twisted.internet.defer import gatherResults
from twisted.trial import unittest
@@ -38,7 +36,6 @@ class defaultMockSharedDB(object):
put_doc = Mock(side_effect=None)
open = Mock(return_value=None)
close = Mock(return_value=None)
- syncable = True
def __call__(self):
return self
@@ -58,7 +55,7 @@ class KeyManagerWithSoledadTestCase(unittest.TestCase, BaseLeapTest):
cert_file=None,
auth_token=None,
shared_db=defaultMockSharedDB(),
- syncable=False)
+ offline=True)
self.km = self._key_manager()
@@ -111,15 +108,6 @@ class KeyManagerWithSoledadTestCase(unittest.TestCase, BaseLeapTest):
gpgbinary=self.gpg_binary_path,
ca_cert_path=ca_cert_path)
- def get_public_binary_key(self):
- with open(PATH + '/fixtures/public_key.bin', 'r') as binary_public_key:
- return binary_public_key.read()
-
- def get_private_binary_key(self):
- with open(
- PATH + '/fixtures/private_key.bin', 'r') as binary_private_key:
- return binary_private_key.read()
-
# key 24D18DDF: public key "Leap Test Key <leap@leap.se>"
KEY_FINGERPRINT = "E36E738D69173C13D709E44F2F455E2824D18DDF"
diff --git a/src/leap/bitmask/mail/testing/common.py b/src/leap/bitmask/mail/testing/common.py
index 1bf1de22..c77148da 100644
--- a/src/leap/bitmask/mail/testing/common.py
+++ b/src/leap/bitmask/mail/testing/common.py
@@ -57,7 +57,7 @@ def _initialize_soledad(email, gnupg_home, tempdir):
local_db_path,
server_url,
cert_file,
- syncable=False)
+ offline=True)
return soledad