summaryrefslogtreecommitdiff
path: root/keymanager
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2016-06-01 21:15:14 +0200
committerRuben Pollan <meskio@sindominio.net>2016-06-01 21:15:14 +0200
commit5ebc52f361153fe2f9b19d2908f09ba5df5433d8 (patch)
treee09a02c7603a8f144c313a4812de1f7ad81316d3 /keymanager
parent4cf66cfa9c3aa05239eb5042d63ffc2d661f8327 (diff)
[test] test key generation (skipped)
Diffstat (limited to 'keymanager')
-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 387332d8..867a13d5 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 47e9005a..4c016764 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.')