summaryrefslogtreecommitdiff
path: root/tests/test_openpgp.py
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-10-25 13:54:58 +0200
committerMichał Górny <mgorny@gentoo.org>2017-10-25 13:56:24 +0200
commit307f382033631dc9668c4d5a331acc16b6e66d7a (patch)
tree0f737dd2e09527764366bb9a71574ff9fdc593d8 /tests/test_openpgp.py
parentad5a8f6a7c084df7ce5a31dc2c72d69fc6398799 (diff)
downloadgemato-307f382033631dc9668c4d5a331acc16b6e66d7a.tar.gz
openpgp: Explicitly detect the lack of supported implementation
Diffstat (limited to 'tests/test_openpgp.py')
-rw-r--r--tests/test_openpgp.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/test_openpgp.py b/tests/test_openpgp.py
index dd2cef1..dc2eafc 100644
--- a/tests/test_openpgp.py
+++ b/tests/test_openpgp.py
@@ -162,6 +162,8 @@ class OpenPGPCorrectKeyTest(unittest.TestCase):
try:
self.env.import_key(
io.BytesIO(PUBLIC_KEY.encode('utf8')))
+ except gemato.exceptions.OpenPGPNoImplementation as e:
+ raise unittest.SkipTest(str(e))
except RuntimeError:
raise unittest.SkipTest('Unable to import OpenPGP key')
@@ -195,5 +197,8 @@ class OpenPGPNoKeyTest(unittest.TestCase):
def test_verify_manifest(self):
with io.BytesIO(SIGNED_MANIFEST.encode('utf8')) as f:
- self.assertRaises(gemato.exceptions.OpenPGPVerificationFailure,
- self.env.verify_file, f)
+ try:
+ self.assertRaises(gemato.exceptions.OpenPGPVerificationFailure,
+ self.env.verify_file, f)
+ except gemato.exceptions.OpenPGPNoImplementation as e:
+ raise unittest.SkipTest(str(e))