summaryrefslogtreecommitdiff
path: root/src/leap/keymanager/tests
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2014-01-17 17:52:22 -0300
committerTomás Touceda <chiiph@leap.se>2014-01-17 17:52:22 -0300
commit175fcd7e82035dd4806ffb9b55364d000c44caaf (patch)
tree6932fbbdfb16373eca01228fba025b0ba9e8524d /src/leap/keymanager/tests
parent4ada92f8b062d77925e5f57c65e9d8ae1878934d (diff)
parentc4f07e6237ee4b4c0cd2180f00d9d681416fe63c (diff)
Merge remote-tracking branch 'refs/remotes/ivan/bug/fix-failing-tests' into develop
Diffstat (limited to 'src/leap/keymanager/tests')
-rw-r--r--src/leap/keymanager/tests/test_keymanager.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/leap/keymanager/tests/test_keymanager.py b/src/leap/keymanager/tests/test_keymanager.py
index 67676e9..e2558e4 100644
--- a/src/leap/keymanager/tests/test_keymanager.py
+++ b/src/leap/keymanager/tests/test_keymanager.py
@@ -118,9 +118,21 @@ class KeyManagerWithSoledadTestCase(BaseLeapTest):
Soledad._get_secrets_from_shared_db = Mock(return_value=None)
Soledad._put_secrets_in_shared_db = Mock(return_value=None)
+ class MockSharedDB(object):
+
+ get_doc = Mock(return_value=None)
+ put_doc = Mock()
+ lock = Mock(return_value=('atoken', 300))
+ unlock = Mock(return_value=True)
+
+ def __call__(self):
+ return self
+
+ Soledad._shared_db = MockSharedDB()
+
self._soledad = Soledad(
- "leap@leap.se",
- "123456",
+ u"leap@leap.se",
+ u"123456",
secrets_path=self.tempdir + "/secret.gpg",
local_db_path=self.tempdir + "/soledad.u1db",
server_url='',