summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-08-01 14:37:13 -0700
committerDylan Baker <dylan@pnwbakers.com>2018-08-01 14:37:13 -0700
commita126820b15d8402aaeae6189cdb9df469b690761 (patch)
tree407ff10e089c0049d1e4e51145bb40683494f5e4 /tests
parent8d1ef69a6e50d3d699ca7b7240ced9e6172fa655 (diff)
tests: use "gpg2" instead of "gpg" command
Some distro (notably debian and derived distros like ubuntu) still package the obsolete gpg 1.x series as "gpg", and provide the modern gpg 2.x tool as "gpg2". Other distros don't package gpg 1.x anymore, but most seem to provide a gpg2 symlink, so this should be safe for them. This is verified working on Archlinux, and is required to make these two tests work on Ubuntu 16.04 Xenial.
Diffstat (limited to 'tests')
-rw-r--r--tests/crypto_test.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/crypto_test.py b/tests/crypto_test.py
index 56cc999d..334fcd56 100644
--- a/tests/crypto_test.py
+++ b/tests/crypto_test.py
@@ -1,4 +1,5 @@
# Copyright (C) 2017 Lucas Hoffmann
+# Copyright © 2017-2018 Dylan Baker
# This file is released under the GNU GPL, version 3 or a later revision.
# For further details see the COPYING file
import os
@@ -125,7 +126,7 @@ class TestDetachedSignatureFor(unittest.TestCase):
text = f.name
self.addCleanup(os.unlink, f.name)
- res = subprocess.check_call(['gpg', '--verify', sig, text],
+ res = subprocess.check_call(['gpg2', '--verify', sig, text],
stdout=DEVNULL, stderr=DEVNULL)
self.assertEqual(res, 0)
@@ -376,7 +377,7 @@ class TestEncrypt(unittest.TestCase):
self.addCleanup(os.unlink, enc_file)
dec = subprocess.check_output(
- ['gpg', '--decrypt', enc_file], stderr=DEVNULL)
+ ['gpg2', '--decrypt', enc_file], stderr=DEVNULL)
self.assertEqual(to_encrypt, dec)