diff options
| -rw-r--r-- | src/leap/soledad/tests/test_crypto.py | 14 | 
1 files changed, 14 insertions, 0 deletions
| diff --git a/src/leap/soledad/tests/test_crypto.py b/src/leap/soledad/tests/test_crypto.py index ca7502af..04ca9e42 100644 --- a/src/leap/soledad/tests/test_crypto.py +++ b/src/leap/soledad/tests/test_crypto.py @@ -159,3 +159,17 @@ class SoledadAuxMethods(BaseLeapTest):          sol = self._soledad_instance()          sol._init_dirs()          self.assertTrue(os.path.isdir(sol.prefix)) + +    def test__init_db(self): +        sol = self._soledad_instance() +        sol._init_dirs() +        sol._gpg = GPGWrapper(gnupghome="%s/gnupg" % self.tempdir) +        #self._soledad._gpg.import_keys(PUBLIC_KEY) +        if not sol._has_privkey(): +            sol._set_privkey(PRIVATE_KEY) +        if not sol._has_symkey(): +            sol._gen_symkey() +        sol._load_symkey() +        sol._init_db() +        from leap.soledad.backends.sqlcipher import SQLCipherDatabase +        self.assertIsInstance(sol._db, SQLCipherDatabase) | 
