summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-10-27 16:27:45 +0200
committerMichał Górny <mgorny@gentoo.org>2017-10-27 16:27:45 +0200
commitc1916a5e10316ab69addadfc4f5d01f42e34018b (patch)
treedd3b7afa5be7ae9c319c83d0b1724428ca8006cd /tests
parentb2a777a359d046e4d68440bc389b59608277d436 (diff)
downloadgemato-c1916a5e10316ab69addadfc4f5d01f42e34018b.tar.gz
test_openpgp: Fix passing key to the CLI test
Diffstat (limited to 'tests')
-rw-r--r--tests/test_openpgp.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/test_openpgp.py b/tests/test_openpgp.py
index c0a3a5f..f9071c9 100644
--- a/tests/test_openpgp.py
+++ b/tests/test_openpgp.py
@@ -318,6 +318,8 @@ class OpenPGPCorrectKeyTest(unittest.TestCase):
def test_cli(self):
d = tempfile.mkdtemp()
try:
+ with io.open(os.path.join(d, '.key.asc'), 'w') as f:
+ f.write(PUBLIC_KEY)
with io.open(os.path.join(d, 'Manifest'), 'w') as f:
f.write(SIGNED_MANIFEST)
@@ -331,6 +333,7 @@ class OpenPGPCorrectKeyTest(unittest.TestCase):
self.assertEqual(
gemato.cli.main(['gemato', 'verify',
+ '--openpgp-key', os.path.join(d, '.key.asc'),
'--require-signed-manifest', d]),
0)
finally: