aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python/tests/t-decrypt.py
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <[email protected]>2018-12-04 17:44:35 +0000
committerAndre Heinecke <[email protected]>2018-12-05 10:46:10 +0000
commit65c28da4e49a8778607fdcf6f51a840166616d9f (patch)
tree703d23f5949080370dd9f69cc1ccc059779adc95 /lang/python/tests/t-decrypt.py
parentpython: ctx.decrypt() has problematic error handling (diff)
downloadgpgme-65c28da4e49a8778607fdcf6f51a840166616d9f.tar.gz
gpgme-65c28da4e49a8778607fdcf6f51a840166616d9f.zip
python: overhaul logic of Context.decrypt()
* lang/python/src/core.py (Context.decrypt): simplify and clarify the logic behind handling verify=False. * lang/python/tests/t-decrypt.py: ensure that we test verify=False -- The function-internal variables were pretty unclear to the reader, and the logic caused pretty nasty breakage when verify=False. GnuPG-Bug-Id: 4271 Signed-off-by: Daniel Kahn Gillmor <[email protected]>
Diffstat (limited to 'lang/python/tests/t-decrypt.py')
-rwxr-xr-xlang/python/tests/t-decrypt.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lang/python/tests/t-decrypt.py b/lang/python/tests/t-decrypt.py
index 44743da7..c72b51ab 100755
--- a/lang/python/tests/t-decrypt.py
+++ b/lang/python/tests/t-decrypt.py
@@ -38,7 +38,7 @@ support.print_data(sink)
# Idiomatic interface.
with gpg.Context() as c:
- plaintext, _, _ = c.decrypt(open(support.make_filename("cipher-1.asc")))
+ plaintext, _, _ = c.decrypt(open(support.make_filename("cipher-1.asc")), verify=False)
assert len(plaintext) > 0
assert plaintext.find(b'Wenn Sie dies lesen k') >= 0, \
'Plaintext not found'