summaryrefslogtreecommitdiff
path: root/keymanager/src/leap
diff options
context:
space:
mode:
Diffstat (limited to 'keymanager/src/leap')
-rw-r--r--keymanager/src/leap/keymanager/tests/test_keymanager.py10
-rw-r--r--keymanager/src/leap/keymanager/tests/test_openpgp.py2
2 files changed, 11 insertions, 1 deletions
diff --git a/keymanager/src/leap/keymanager/tests/test_keymanager.py b/keymanager/src/leap/keymanager/tests/test_keymanager.py
index 387332d..867a13d 100644
--- a/keymanager/src/leap/keymanager/tests/test_keymanager.py
+++ b/keymanager/src/leap/keymanager/tests/test_keymanager.py
@@ -134,6 +134,16 @@ class KeyManagerUtilTestCase(unittest.TestCase):
class KeyManagerKeyManagementTestCase(KeyManagerWithSoledadTestCase):
@defer.inlineCallbacks
+ def _test_gen_key(self):
+ km = self._key_manager()
+ key = yield km.gen_key()
+ self.assertIsInstance(key, OpenPGPKey)
+ self.assertEqual(
+ 'leap@leap.se', key.address, 'Wrong address bound to key.')
+ self.assertEqual(
+ 4096, key.length, 'Wrong key length.')
+
+ @defer.inlineCallbacks
def test_get_all_keys_in_db(self):
km = self._key_manager()
yield km._openpgp.put_raw_key(PRIVATE_KEY, ADDRESS)
diff --git a/keymanager/src/leap/keymanager/tests/test_openpgp.py b/keymanager/src/leap/keymanager/tests/test_openpgp.py
index 47e9005..4c01676 100644
--- a/keymanager/src/leap/keymanager/tests/test_openpgp.py
+++ b/keymanager/src/leap/keymanager/tests/test_openpgp.py
@@ -59,7 +59,7 @@ class OpenPGPCryptoTestCase(KeyManagerWithSoledadTestCase):
key = yield pgp.gen_key('user@leap.se')
self.assertIsInstance(key, OpenPGPKey)
self.assertEqual(
- ['user@leap.se'], key.address, 'Wrong address bound to key.')
+ 'user@leap.se', key.address, 'Wrong address bound to key.')
self.assertEqual(
4096, key.length, 'Wrong key length.')