From 5ebc52f361153fe2f9b19d2908f09ba5df5433d8 Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Wed, 1 Jun 2016 21:15:14 +0200 Subject: [test] test key generation (skipped) --- keymanager/src/leap/keymanager/tests/test_keymanager.py | 10 ++++++++++ keymanager/src/leap/keymanager/tests/test_openpgp.py | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) 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 @@ -133,6 +133,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() 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.') -- cgit v1.2.3