diff options
author | drebs <drebs@riseup.net> | 2017-02-27 15:44:50 -0300 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2017-02-27 20:55:07 +0100 |
commit | bcfd0c7fd461876d080bca14ed4d038837834f02 (patch) | |
tree | 7d6fb992d38e97270a5169983cf7bdeb90cc4b2e /src/leap/bitmask/keymanager/testing | |
parent | e266869facbfc1097e7e25a536e1b2dfa454583e (diff) |
[test] pass a fake shared db to soledad during tests
Diffstat (limited to 'src/leap/bitmask/keymanager/testing')
-rw-r--r-- | src/leap/bitmask/keymanager/testing/__init__.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/leap/bitmask/keymanager/testing/__init__.py b/src/leap/bitmask/keymanager/testing/__init__.py index 9001207f..3cc0c100 100644 --- a/src/leap/bitmask/keymanager/testing/__init__.py +++ b/src/leap/bitmask/keymanager/testing/__init__.py @@ -243,6 +243,19 @@ class KeyManagerWithSoledadTestCase(unittest.TestCase, BaseLeapTest): def setUp(self): self.gpg_binary_path = get_gpg_bin_path() + # TODO: we pass a fake shared database to soledad because we don't want + # it o try to reach network to lookup a stored secret in the shared + # database. This logic still has to be improved in soledad itself to + # account for tests, and when that is done we can remove this from + # here. + class FakeSharedDb(object): + + def get_doc(self, doc_id): + return None + + def put_doc(self, doc): + return None + self._soledad = Soledad( u"leap@leap.se", u"123456", @@ -252,6 +265,7 @@ class KeyManagerWithSoledadTestCase(unittest.TestCase, BaseLeapTest): cert_file=None, auth_token=None, offline=True, + shared_db=FakeSharedDb(), ) def tearDown(self): |