From b0e2f322aa571a5e1999c069779f589e282a566c Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Wed, 30 Nov 2016 02:30:44 -0500 Subject: convert from pygpgme to the python "gpg" module This converts from the now abandoned pygpgme project for wrapping gpgme, to the upstream gpgme python bindings (which are descended from the pyme project, before they became official). Largely this change should not be user visible, but there are a couple cases where the new bindings provide slightly more detailed error messages, and alot directly presents those messages to users. This patch has been significantly revised and updated by Dylan Baker, but was originally authored by Daniel Kahn Gillmor. Fixes #1069 --- tests/utilities.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/utilities.py') diff --git a/tests/utilities.py b/tests/utilities.py index 45433c99..402feb38 100644 --- a/tests/utilities.py +++ b/tests/utilities.py @@ -21,7 +21,7 @@ from __future__ import absolute_import import functools import unittest -import gpgme +import gpg import mock @@ -149,7 +149,7 @@ class ModuleCleanup(object): def make_uid(email, uid=u'mocked', revoked=False, invalid=False, - validity=gpgme.VALIDITY_FULL): + validity=gpg.constants.validity.FULL): uid_ = mock.Mock() uid_.email = email uid_.uid = uid @@ -162,7 +162,7 @@ def make_uid(email, uid=u'mocked', revoked=False, invalid=False, def make_key(revoked=False, expired=False, invalid=False, can_encrypt=True, can_sign=True): - mock_key = mock.create_autospec(gpgme.Key) + mock_key = mock.Mock() mock_key.uids = [make_uid(u'foo@example.com')] mock_key.revoked = revoked mock_key.expired = expired -- cgit v1.2.3