diff options
-rw-r--r-- | tests/crypto_test.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/crypto_test.py b/tests/crypto_test.py index d0877bea..e51adaeb 100644 --- a/tests/crypto_test.py +++ b/tests/crypto_test.py @@ -266,6 +266,11 @@ class TestGetKey(unittest.TestCase): def test_missing_key(self): with self.assertRaises(GPGProblem) as caught: + crypto.get_key('foo@example.com') + self.assertEqual(caught.exception.code, GPGCode.NOT_FOUND) + + def test_invalid_key(self): + with self.assertRaises(GPGProblem) as caught: crypto.get_key('z') self.assertEqual(caught.exception.code, GPGCode.NOT_FOUND) |