[Pkg-privacy-commits] [monkeysign] 05/08: also test return values of import_keys, feel actual bad data
Ximin Luo
infinity0 at moszumanska.debian.org
Sat Aug 22 13:34:15 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch dev/python-gnupg
in repository monkeysign.
commit fcd21ffde6901147b0838836482b13527835f326
Author: Antoine Beaupré <anarcat at koumbit.org>
Date: Fri Aug 29 21:39:17 2014 -0700
also test return values of import_keys, feel actual bad data
requires https://github.com/isislovecruft/python-gnupg/pull/61
---
tests/test_gpg.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/test_gpg.py b/tests/test_gpg.py
index 7e54158..ae837ad 100755
--- a/tests/test_gpg.py
+++ b/tests/test_gpg.py
@@ -133,13 +133,13 @@ class TestKeyringBasics(TestKeyringBase):
it should throw an exception if there's something wrong with the backend too
"""
- self.gpg.import_keys(open(os.path.dirname(__file__) + '/96F47C6A.asc').read())
+ self.assertTrue(self.gpg.import_keys(open(os.path.dirname(__file__) + '/96F47C6A.asc').read()))
pubkeys = self.gpg.list_keys()
self.assertGreater(len(pubkeys), 0)
def test_import_fail(self):
"""test that import_keys() throws an error on wrong data"""
- self.assertFalse(self.gpg.import_keys(''))
+ self.assertFalse(self.gpg.import_keys('THIS IS NOT A PUBLIC KEY'))
def test_export(self):
"""test that we can export data similar to what we import
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/monkeysign.git
More information about the Pkg-privacy-commits
mailing list