summaryrefslogtreecommitdiff
path: root/tests/test_openpgp.py
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-02-02 17:10:22 +0100
committerMichał Górny <mgorny@gentoo.org>2018-02-02 17:10:22 +0100
commitedf36c5acd59b7059588efc10828ed420ba203a7 (patch)
treea2835d1869d49936f1181cf8e766251accf031d9 /tests/test_openpgp.py
parentdb2643dab3d6f72470bbfb32cc3536721b669511 (diff)
downloadgemato-edf36c5acd59b7059588efc10828ed420ba203a7.tar.gz
openpgp: Fix handling OpenPGPNoImplementation in tests
Diffstat (limited to 'tests/test_openpgp.py')
-rw-r--r--tests/test_openpgp.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/test_openpgp.py b/tests/test_openpgp.py
index 981f550..81aca19 100644
--- a/tests/test_openpgp.py
+++ b/tests/test_openpgp.py
@@ -378,6 +378,9 @@ class OpenPGPCorrectKeyTest(unittest.TestCase):
except gemato.exceptions.OpenPGPRuntimeError as e:
self.env.close()
raise unittest.SkipTest(str(e))
+ except gemato.exceptions.OpenPGPNoImplementation as e:
+ self.env.close()
+ raise unittest.SkipTest(str(e))
def tearDown(self):
self.env.close()
@@ -605,6 +608,9 @@ class OpenPGPExpiredKeyTest(OpenPGPNoKeyTest):
except gemato.exceptions.OpenPGPRuntimeError as e:
self.env.close()
raise unittest.SkipTest(str(e))
+ except gemato.exceptions.OpenPGPNoImplementation as e:
+ self.env.close()
+ raise unittest.SkipTest(str(e))
def tearDown(self):
self.env.close()
@@ -624,6 +630,9 @@ class OpenPGPRevokedKeyTest(OpenPGPNoKeyTest):
except gemato.exceptions.OpenPGPRuntimeError as e:
self.env.close()
raise unittest.SkipTest(str(e))
+ except gemato.exceptions.OpenPGPNoImplementation as e:
+ self.env.close()
+ raise unittest.SkipTest(str(e))
def tearDown(self):
self.env.close()
@@ -643,6 +652,9 @@ class OpenPGPExpiredSignatureTest(unittest.TestCase):
except gemato.exceptions.OpenPGPRuntimeError as e:
self.env.close()
raise unittest.SkipTest(str(e))
+ except gemato.exceptions.OpenPGPNoImplementation as e:
+ self.env.close()
+ raise unittest.SkipTest(str(e))
def tearDown(self):
self.env.close()
@@ -775,6 +787,8 @@ class OpenPGPContextManagerTest(unittest.TestCase):
env.import_key(io.BytesIO(PUBLIC_KEY))
except gemato.exceptions.OpenPGPRuntimeError as e:
raise unittest.SkipTest(str(e))
+ except gemato.exceptions.OpenPGPNoImplementation as e:
+ raise unittest.SkipTest(str(e))
sig = env.verify_file(f)
self.assertEqual(sig.fingerprint, KEY_FINGERPRINT)
@@ -809,6 +823,9 @@ class OpenPGPPrivateKeyTest(unittest.TestCase):
except gemato.exceptions.OpenPGPRuntimeError as e:
self.env.close()
raise unittest.SkipTest(str(e))
+ except gemato.exceptions.OpenPGPNoImplementation as e:
+ self.env.close()
+ raise unittest.SkipTest(str(e))
def tearDown(self):
self.env.close()