python: Improve keylist test.
authorJustus Winter <justus@g10code.com>
Mon, 21 Aug 2017 08:54:10 +0000 (10:54 +0200)
committerJustus Winter <justus@g10code.com>
Mon, 21 Aug 2017 08:54:10 +0000 (10:54 +0200)
* lang/python/tests/t-keylist.py: Check a keylist matching no keys.

Signed-off-by: Justus Winter <justus@g10code.com>
lang/python/tests/t-keylist.py

index 76c793e..4505d3c 100755 (executable)
@@ -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: