diff options
author | Jean-Paul Calderone <exarkun@divmod.com> | 2011-06-12 21:48:57 -0400 |
---|---|---|
committer | Jean-Paul Calderone <exarkun@divmod.com> | 2011-06-12 21:48:57 -0400 |
commit | e81020e6e20988d97f1b7ad0f0d493b40a24dd09 (patch) | |
tree | 892587224f5336d28889a554f6e4793d94ab25bb /OpenSSL/test | |
parent | 7d74854a2765970ff35f1e462cb2b5044d4bd77b (diff) | |
download | pyopenssl-e81020e6e20988d97f1b7ad0f0d493b40a24dd09.tar.gz |
test bad args case of PKey.check
Diffstat (limited to 'OpenSSL/test')
-rw-r--r-- | OpenSSL/test/test_crypto.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/OpenSSL/test/test_crypto.py b/OpenSSL/test/test_crypto.py index cda0137..5cdcefb 100644 --- a/OpenSSL/test/test_crypto.py +++ b/OpenSSL/test/test_crypto.py @@ -621,6 +621,16 @@ class PKeyTests(TestCase): self.assertRaises(Error, key.check) + def test_check_wrong_args(self): + """ + L{PKeyType.check} raises L{TypeError} if called with any arguments. + """ + self.assertRaises(TypeError, PKey().check, None) + self.assertRaises(TypeError, PKey().check, object()) + self.assertRaises(TypeError, PKey().check, 1) + + + class X509NameTests(TestCase): """ Unit tests for L{OpenSSL.crypto.X509Name}. |