diff options
Diffstat (limited to 'tests/test_openpgp.py')
-rw-r--r-- | tests/test_openpgp.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_openpgp.py b/tests/test_openpgp.py index 7a48ea4..ef8f14b 100644 --- a/tests/test_openpgp.py +++ b/tests/test_openpgp.py @@ -3,6 +3,7 @@ # (c) 2017 Michał Górny # Licensed under the terms of 2-clause BSD license +import base64 import io import os.path import shutil @@ -498,6 +499,14 @@ class OpenPGPContextManagerTest(unittest.TestCase): except gemato.exceptions.OpenPGPNoImplementation as e: raise unittest.SkipTest(str(e)) + def test_import_binary_key(self): + with gemato.openpgp.OpenPGPEnvironment() as env: + enc = b''.join(PUBLIC_KEY.splitlines()[2:-1]) + try: + env.import_key(io.BytesIO(base64.b64decode(enc))) + except gemato.exceptions.OpenPGPNoImplementation as e: + raise unittest.SkipTest(str(e)) + def test_verify_manifest(self): with io.StringIO(SIGNED_MANIFEST) as f: with gemato.openpgp.OpenPGPEnvironment() as env: |