diff options
author | Tomás Touceda <chiiph@leap.se> | 2014-04-04 16:24:11 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2014-04-04 16:24:11 -0300 |
commit | b25f3ae5ecaa70abaf80edc62931b5980c14e637 (patch) | |
tree | 290162fc323925f043ea037a09a9b347b97b954f /src/leap/keymanager/tests | |
parent | 77e4e1d037a8eb796553b3f28f31e4f4d1ccee84 (diff) | |
parent | ee170c64aacdc59043b0e620fc476c1e60a0a1e0 (diff) |
Merge branch 'release-0.3.8'0.3.8
Diffstat (limited to 'src/leap/keymanager/tests')
-rw-r--r-- | src/leap/keymanager/tests/test_keymanager.py | 16 |
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='', |