summaryrefslogtreecommitdiff
path: root/src/leap/soledad
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/soledad')
-rw-r--r--src/leap/soledad/tests/test_crypto.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/leap/soledad/tests/test_crypto.py b/src/leap/soledad/tests/test_crypto.py
index 04ca9e42..6be05243 100644
--- a/src/leap/soledad/tests/test_crypto.py
+++ b/src/leap/soledad/tests/test_crypto.py
@@ -173,3 +173,14 @@ class SoledadAuxMethods(BaseLeapTest):
sol._init_db()
from leap.soledad.backends.sqlcipher import SQLCipherDatabase
self.assertIsInstance(sol._db, SQLCipherDatabase)
+
+ def test__has_symkey(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)
+ self.assertFalse(sol._has_symkey())
+ sol._gen_symkey()
+ self.assertTrue(sol._has_symkey())