diff options
author | Justus Winter <[email protected]> | 2017-04-11 10:07:59 +0000 |
---|---|---|
committer | Justus Winter <[email protected]> | 2017-04-11 10:24:41 +0000 |
commit | 979d48e823357af9999a2adb34d75adaade8dec2 (patch) | |
tree | 96954cb3fe4fdbd2d6dae8c65fdfd45b24d080dc /lang/python/tests/support.py | |
parent | python: use autoconf pre-processor when building via autoconf (diff) | |
download | gpgme-979d48e823357af9999a2adb34d75adaade8dec2.tar.gz gpgme-979d48e823357af9999a2adb34d75adaade8dec2.zip |
python: Skip TOFU test if not supported by GnuPG.
* lang/python/tests/support.py (have_tofu_support): New function.
* lang/python/tests/t-quick-key-manipulation.py: Skip TOFU test if not
supported by GnuPG.
Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to 'lang/python/tests/support.py')
-rw-r--r-- | lang/python/tests/support.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lang/python/tests/support.py b/lang/python/tests/support.py index fabd8180..efccf315 100644 --- a/lang/python/tests/support.py +++ b/lang/python/tests/support.py @@ -35,6 +35,12 @@ def assert_gpg_version(version=(2, 1, 0)): c.engine_info.version, '.'.join(map(str, version)))) sys.exit(77) +def have_tofu_support(ctx, some_uid): + keys = list(ctx.keylist(some_uid, + mode=(gpg.constants.keylist.mode.LOCAL + |gpg.constants.keylist.mode.WITH_TOFU))) + return len(keys) > 0 + # Skip the Python tests for GnuPG < 2.1.12. Prior versions do not # understand the command line flags that we assume exist. C.f. issue # 3008. |