diff options
author | Ruben Pollan <meskio@sindominio.net> | 2016-06-01 21:15:14 +0200 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2016-06-01 21:15:14 +0200 |
commit | 06d0c7e8b4206aadb71281f607107ac7e0868945 (patch) | |
tree | c4ef8bffe451c8af4efb2c79186eb88d0c36097f | |
parent | d6ba8f78ab16a5391ff0089fa79e01ba25b6fd26 (diff) |
[test] test key generation (skipped)
-rw-r--r-- | src/leap/keymanager/tests/test_keymanager.py | 10 | ||||
-rw-r--r-- | src/leap/keymanager/tests/test_openpgp.py | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/leap/keymanager/tests/test_keymanager.py b/src/leap/keymanager/tests/test_keymanager.py index 387332d..867a13d 100644 --- a/src/leap/keymanager/tests/test_keymanager.py +++ b/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/src/leap/keymanager/tests/test_openpgp.py b/src/leap/keymanager/tests/test_openpgp.py index 47e9005..4c01676 100644 --- a/src/leap/keymanager/tests/test_openpgp.py +++ b/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.') |