summaryrefslogtreecommitdiff
path: root/tests/integration/keymanager/test_openpgp.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/integration/keymanager/test_openpgp.py')
-rw-r--r--tests/integration/keymanager/test_openpgp.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/integration/keymanager/test_openpgp.py b/tests/integration/keymanager/test_openpgp.py
index b16e52f..d04f5d0 100644
--- a/tests/integration/keymanager/test_openpgp.py
+++ b/tests/integration/keymanager/test_openpgp.py
@@ -37,6 +37,9 @@ from common import (
PUBLIC_KEY_2,
PRIVATE_KEY,
PRIVATE_KEY_2,
+ NEW_PUB_KEY,
+ OLD_AND_NEW_KEY_ADDRESS,
+ OLD_PUB_KEY
)
@@ -339,6 +342,15 @@ class OpenPGPCryptoTestCase(KeyManagerWithSoledadTestCase):
d = pgp.get_key(address, private=private)
return self.assertFailure(d, KeyNotFound)
+ def test_key_is_signed_by(self):
+ pgp = openpgp.OpenPGPScheme(
+ self._soledad, gpgbinary=self.gpg_binary_path)
+ old_pubkey, old_privkey = pgp.parse_key(
+ OLD_PUB_KEY, OLD_AND_NEW_KEY_ADDRESS)
+ new_pubkey, new_privkey = pgp.parse_key(
+ NEW_PUB_KEY, OLD_AND_NEW_KEY_ADDRESS)
+ self.assertTrue(new_pubkey.is_signed_by(old_pubkey))
+
@inlineCallbacks
def _insert_key_docs(self, refreshed_at):
for date in refreshed_at: