diff options
author | Michał Górny <mgorny@gentoo.org> | 2017-10-25 13:54:58 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2017-10-25 13:56:24 +0200 |
commit | 307f382033631dc9668c4d5a331acc16b6e66d7a (patch) | |
tree | 0f737dd2e09527764366bb9a71574ff9fdc593d8 /tests | |
parent | ad5a8f6a7c084df7ce5a31dc2c72d69fc6398799 (diff) | |
download | gemato-307f382033631dc9668c4d5a331acc16b6e66d7a.tar.gz |
openpgp: Explicitly detect the lack of supported implementation
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_openpgp.py | 9 |
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)) |