diff options
author | Ruben Pollan <meskio@sindominio.net> | 2015-09-29 16:36:20 +0200 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2015-10-01 00:01:19 +0200 |
commit | 9a9c53eea49092e80737c84a2f850dd682c33ae3 (patch) | |
tree | 84534f413ad7d9b22d01abcbcdc74f4a503aa593 /src/leap/keymanager/tests/__init__.py | |
parent | 6a8cd66c656b810fb5052c75fa21002de5330273 (diff) |
[feat] self-repair the keyring if keys get duplicated
In some cases in the past keys got stored twice in different documents.
Hopefully this issue is solved now, this tries to self-repair the keyring
if encounters that. This is not really solving the problem, if it keeps
happening we need to investigate the source.
- Resolves: #7498
Diffstat (limited to 'src/leap/keymanager/tests/__init__.py')
-rw-r--r-- | src/leap/keymanager/tests/__init__.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/leap/keymanager/tests/__init__.py b/src/leap/keymanager/tests/__init__.py index 9b95e1ac..cd612c43 100644 --- a/src/leap/keymanager/tests/__init__.py +++ b/src/leap/keymanager/tests/__init__.py @@ -66,9 +66,15 @@ class KeyManagerWithSoledadTestCase(unittest.TestCase, BaseLeapTest): for private in [True, False]: d = km.get_all_keys(private=private) d.addCallback(delete_keys) + d.addCallback(check_deleted, private) deferreds.append(d) return gatherResults(deferreds) + def check_deleted(_, private): + d = km.get_all_keys(private=private) + d.addCallback(lambda keys: self.assertEqual(keys, [])) + return d + # wait for the indexes to be ready for the tear down d = km._wrapper_map[OpenPGPKey].deferred_indexes d.addCallback(get_and_delete_keys) @@ -91,6 +97,7 @@ class KeyManagerWithSoledadTestCase(unittest.TestCase, BaseLeapTest): # key 24D18DDF: public key "Leap Test Key <leap@leap.se>" +KEY_ID = "2F455E2824D18DDF" KEY_FINGERPRINT = "E36E738D69173C13D709E44F2F455E2824D18DDF" PUBLIC_KEY = """ -----BEGIN PGP PUBLIC KEY BLOCK----- |