summaryrefslogtreecommitdiff
path: root/lang/python/tests/t-import.py
diff options
context:
space:
mode:
authorJinWang An <jinwang.an@samsung.com>2021-12-01 16:54:36 +0900
committerJinWang An <jinwang.an@samsung.com>2021-12-01 16:54:36 +0900
commit3a4efa5aa27f73c93a1b020b8b30f07f0b4e46c7 (patch)
treeb736cbf7c30b64e009a62666238787ae6881eb2c /lang/python/tests/t-import.py
parent10e16af58579b2e22154d944d8cb4144924a8406 (diff)
downloadgpgme-3a4efa5aa27f73c93a1b020b8b30f07f0b4e46c7.tar.gz
gpgme-3a4efa5aa27f73c93a1b020b8b30f07f0b4e46c7.tar.bz2
gpgme-3a4efa5aa27f73c93a1b020b8b30f07f0b4e46c7.zip
Imported Upstream version 1.8.0upstream/1.8.0
Diffstat (limited to 'lang/python/tests/t-import.py')
-rwxr-xr-xlang/python/tests/t-import.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/lang/python/tests/t-import.py b/lang/python/tests/t-import.py
index 0b50d02..5b0576f 100755
--- a/lang/python/tests/t-import.py
+++ b/lang/python/tests/t-import.py
@@ -20,7 +20,7 @@
from __future__ import absolute_import, print_function, unicode_literals
del absolute_import, print_function, unicode_literals
-from pyme import core, constants
+import gpg
import support
def check_result(result, fpr, secret):
@@ -67,13 +67,13 @@ def check_result(result, fpr, secret):
assert len(result.imports) == 1 or fpr == result.imports[1].fpr
assert result.imports[0].result == 0
-support.init_gpgme(constants.PROTOCOL_OpenPGP)
-c = core.Context()
+support.init_gpgme(gpg.constants.protocol.OpenPGP)
+c = gpg.Context()
-c.op_import(core.Data(file=support.make_filename("pubkey-1.asc")))
+c.op_import(gpg.Data(file=support.make_filename("pubkey-1.asc")))
result = c.op_import_result()
check_result(result, "ADAB7FCC1F4DE2616ECFA402AF82244F9CD9FD55", False)
-c.op_import(core.Data(file=support.make_filename("seckey-1.asc")))
+c.op_import(gpg.Data(file=support.make_filename("seckey-1.asc")))
result = c.op_import_result()
check_result(result, "ADAB7FCC1F4DE2616ECFA402AF82244F9CD9FD55", True)