diff options
author | Ruben Pollan <meskio@sindominio.net> | 2014-09-16 11:01:43 -0500 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2014-09-16 12:57:42 -0500 |
commit | ac0432fd35d5325110c96db065ef6eb6257a8d31 (patch) | |
tree | f1e0b5f5a740a77c707554335b176836f6c5befe /keymanager/src/leap | |
parent | c6fcde7d333d1769dbdfc1c8be255378a20895d6 (diff) |
Rename method get_all_keys_in_local_db -> get_all_keys
Diffstat (limited to 'keymanager/src/leap')
-rw-r--r-- | keymanager/src/leap/keymanager/__init__.py | 2 | ||||
-rw-r--r-- | keymanager/src/leap/keymanager/tests/test_keymanager.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/keymanager/src/leap/keymanager/__init__.py b/keymanager/src/leap/keymanager/__init__.py index 37eb223..3888c0a 100644 --- a/keymanager/src/leap/keymanager/__init__.py +++ b/keymanager/src/leap/keymanager/__init__.py @@ -298,7 +298,7 @@ class KeyManager(object): return key - def get_all_keys_in_local_db(self, private=False): + def get_all_keys(self, private=False): """ Return all keys stored in local database. diff --git a/keymanager/src/leap/keymanager/tests/test_keymanager.py b/keymanager/src/leap/keymanager/tests/test_keymanager.py index f9ba04f..7192bfb 100644 --- a/keymanager/src/leap/keymanager/tests/test_keymanager.py +++ b/keymanager/src/leap/keymanager/tests/test_keymanager.py @@ -142,9 +142,9 @@ class KeyManagerWithSoledadTestCase(BaseLeapTest): def tearDown(self): km = self._key_manager() - for key in km.get_all_keys_in_local_db(): + for key in km.get_all_keys(): km._wrapper_map[key.__class__].delete_key(key) - for key in km.get_all_keys_in_local_db(private=True): + for key in km.get_all_keys(private=True): km._wrapper_map[key.__class__].delete_key(key) def _key_manager(self, user=ADDRESS, url='', token=None): @@ -343,12 +343,12 @@ class KeyManagerKeyManagementTestCase(KeyManagerWithSoledadTestCase): km = self._key_manager() km._wrapper_map[OpenPGPKey].put_ascii_key(PRIVATE_KEY) # get public keys - keys = km.get_all_keys_in_local_db(False) + keys = km.get_all_keys(False) self.assertEqual(len(keys), 1, 'Wrong number of keys') self.assertEqual(ADDRESS, keys[0].address) self.assertFalse(keys[0].private) # get private keys - keys = km.get_all_keys_in_local_db(True) + keys = km.get_all_keys(True) self.assertEqual(len(keys), 1, 'Wrong number of keys') self.assertEqual(ADDRESS, keys[0].address) self.assertTrue(keys[0].private) |