python: Improve keylist test.

* lang/python/tests/t-keylist.py: Check a keylist matching no keys.

Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
Justus Winter 2017-08-21 10:54:10 +02:00
parent b9b08e4693
commit 70c8be9efe
No known key found for this signature in database
GPG Key ID: DD1A52F9DA8C9020

View File

@ -229,6 +229,9 @@ alpha_keys = list(c.op_keylist_all(b"Alpha"))
assert len(alpha_keys) == 1, "Expected only one key for 'Alpha', got %r" % len(alpha_keys)
# Check negative result.
assert len(list(c.keylist("no such key in sight"))) == 0
for i, key in enumerate(c.keylist()):
try: