aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2017-02-20 09:23:41 +0000
committerJustus Winter <[email protected]>2017-02-20 09:23:41 +0000
commita7c6353edab57b67180aa127ec77d9353c2366fb (patch)
treefdf1c5b208fe8e6760a87eec543c6dd79a079d9a
parentpython: Support manipulating the TOFU policy. (diff)
downloadgpgme-a7c6353edab57b67180aa127ec77d9353c2366fb.tar.gz
gpgme-a7c6353edab57b67180aa127ec77d9353c2366fb.zip
python: Fix test.
* lang/python/tests/t-quick-key-manipulation.py: Modify the configuration file in the ephemeral home directory, not the one used by all the tests. Fixes-commit: 15fbac9e72a4d1bff9a3b9e9822f9175b09fbcd5 Signed-off-by: Justus Winter <[email protected]>
-rwxr-xr-xlang/python/tests/t-quick-key-manipulation.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lang/python/tests/t-quick-key-manipulation.py b/lang/python/tests/t-quick-key-manipulation.py
index d7d2bd4f..45e4c0e2 100755
--- a/lang/python/tests/t-quick-key-manipulation.py
+++ b/lang/python/tests/t-quick-key-manipulation.py
@@ -20,6 +20,7 @@
from __future__ import absolute_import, print_function, unicode_literals
del absolute_import, print_function, unicode_literals
+import os
import gpg
import support
@@ -92,7 +93,7 @@ with support.EphemeralContext() as ctx:
pass
# Check setting the TOFU policy.
- with open("gpg.conf", "a") as handle:
+ with open(os.path.join(ctx.home_dir, "gpg.conf"), "a") as handle:
handle.write("trust-model tofu+pgp\n")
for name, policy in [(name, getattr(gpg.constants.tofu.policy, name))