diff options
author | Justus Winter <[email protected]> | 2016-05-23 16:23:34 +0000 |
---|---|---|
committer | Justus Winter <[email protected]> | 2016-05-23 16:23:34 +0000 |
commit | 283f0bdc3d32624dac93d02ba3df516e69d8d4ba (patch) | |
tree | 4dd2656100ef95e0175fbca1a855c34376d73c15 /lang/python/tests/t-callbacks.py | |
parent | python: Move edit callback function. (diff) | |
download | gpgme-283f0bdc3d32624dac93d02ba3df516e69d8d4ba.tar.gz gpgme-283f0bdc3d32624dac93d02ba3df516e69d8d4ba.zip |
python: Fix hook.
* lang/python/helpers.c (pyProgressCb): Fix getting hook data.
* lang/python/tests/t-callbacks.py: Show that this works.
Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to '')
-rwxr-xr-x | lang/python/tests/t-callbacks.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lang/python/tests/t-callbacks.py b/lang/python/tests/t-callbacks.py index 13ce4864..70f641d7 100755 --- a/lang/python/tests/t-callbacks.py +++ b/lang/python/tests/t-callbacks.py @@ -91,12 +91,13 @@ Expire-Date: 2020-12-31 messages = [] def progress_cb(what, typ, current, total, hook=None): + assert hook == messages messages.append( "PROGRESS UPDATE: what = {}, type = {}, current = {}, total = {}" .format(what, typ, current, total)) c = core.Context() -c.set_progress_cb(progress_cb, None) +c.set_progress_cb(progress_cb, messages) c.op_genkey(parms, None, None) assert len(messages) > 0 |