summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2014-10-16 14:41:42 +0200
committerKali Kaneko <kali@leap.se>2015-02-11 14:05:42 -0400
commit85e5b4d68b328eb06a52581dee300ebafc1cc763 (patch)
treea97b2d4a78373b739770340301c49b4f3e398ae2
parent70a88ba3a8761da2d2f7f9f5fb9d044d88de98a5 (diff)
specify not syncable shared db
-rw-r--r--src/leap/mail/imap/tests/utils.py5
-rw-r--r--src/leap/mail/tests/__init__.py20
2 files changed, 11 insertions, 14 deletions
diff --git a/src/leap/mail/imap/tests/utils.py b/src/leap/mail/imap/tests/utils.py
index 0932bd4..5339acf 100644
--- a/src/leap/mail/imap/tests/utils.py
+++ b/src/leap/mail/imap/tests/utils.py
@@ -65,7 +65,7 @@ def initialize_soledad(email, gnupg_home, tempdir):
passphrase = u"verysecretpassphrase"
secret_path = os.path.join(tempdir, "secret.gpg")
local_db_path = os.path.join(tempdir, "soledad.u1db")
- server_url = "http://provider"
+ server_url = "https://provider"
cert_file = ""
class MockSharedDB(object):
@@ -86,7 +86,8 @@ def initialize_soledad(email, gnupg_home, tempdir):
secret_path,
local_db_path,
server_url,
- cert_file)
+ cert_file,
+ syncable=False)
return _soledad
diff --git a/src/leap/mail/tests/__init__.py b/src/leap/mail/tests/__init__.py
index dc24293..10bc5fe 100644
--- a/src/leap/mail/tests/__init__.py
+++ b/src/leap/mail/tests/__init__.py
@@ -14,12 +14,9 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-
"""
-Base classes and keys for SMTP gateway tests.
+Base classes and keys for leap.mail tests.
"""
-
import os
import distutils.spawn
import shutil
@@ -27,9 +24,6 @@ import tempfile
from mock import Mock
-from twisted.trial import unittest
-
-
from leap.soledad.client import Soledad
from leap.keymanager import (
KeyManager,
@@ -43,7 +37,7 @@ from leap.common.testing.basetest import BaseLeapTest
def _find_gpg():
gpg_path = distutils.spawn.find_executable('gpg')
return os.path.realpath(gpg_path) if gpg_path is not None else "/usr/bin/gpg"
-
+
class TestCaseWithKeyManager(BaseLeapTest):
@@ -100,23 +94,25 @@ class TestCaseWithKeyManager(BaseLeapTest):
def __call__(self):
return self
- Soledad._shared_db = MockSharedDB()
-
- return Soledad(
+ soledad = Soledad(
uuid,
passphrase,
secrets_path=secrets_path,
local_db_path=local_db_path,
server_url=server_url,
cert_file=cert_file,
+ syncable=False
)
+ soledad._shared_db = MockSharedDB()
+ return soledad
+
def _keymanager_instance(self, address):
"""
Return a Key Manager instance for tests.
"""
self._config = {
- 'host': 'http://provider/',
+ 'host': 'https://provider/',
'port': 25,
'username': address,
'password': '<password>',