Verified Commit 873012e4 by Tulio Casagrande Committed by meskio

[bug] specify _get_inactive_private_keys as a private method

parent 425c2259
......@@ -208,7 +208,7 @@ class KeyManager(object):
raw_key, address=address, validation=validation_level)
@defer.inlineCallbacks
def get_inactive_private_keys(self):
def _get_inactive_private_keys(self):
"""
Return all inactive private keys bound to address, that are
stored locally.
......@@ -555,7 +555,7 @@ class KeyManager(object):
result = yield _decrypt(keys)
except keymanager_errors.DecryptError as e:
verify_key, active_key = keys
inactive_keys = yield self.get_inactive_private_keys()
inactive_keys = yield self._get_inactive_private_keys()
result = yield decrypt_with_inactive_keys(inactive_keys,
verify_key, e)
defer.returnValue(result)
......
......@@ -223,7 +223,7 @@ class KeyManagerKeyManagementTestCase(KeyManagerWithSoledadTestCase):
yield km._openpgp.put_raw_key(PRIVATE_KEY, ADDRESS)
yield km._openpgp.put_raw_key(DIFFERENT_PRIVATE_KEY, ADDRESS)
# get the key
inactive_keys = yield km.get_inactive_private_keys()
inactive_keys = yield km._get_inactive_private_keys()
active_key = yield km.get_key(
ADDRESS, private=True, fetch_remote=False)
self.assertEqual(1, len(inactive_keys))
......@@ -627,7 +627,7 @@ class KeyManagerKeyManagementTestCase(KeyManagerWithSoledadTestCase):
old_key = yield km.get_key(ADDRESS_EXPIRING, fetch_remote=False)
new_key = yield km.regenerate_key()
inactive_private_keys = yield km.get_inactive_private_keys()
inactive_private_keys = yield km._get_inactive_private_keys()
renewed_public_key = yield km.get_key(ADDRESS_EXPIRING, private=False,
fetch_remote=False)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment