~exarkun/pyopenssl/rsa-check

« back to all changes in this revision

Viewing changes to test/test_crypto.py

  • Committer: Jean-Paul Calderone
  • Date: 2009-05-13 19:45:07 UTC
  • Revision ID: exarkun@divmod.com-20090513194507-xx1v9h7im1siu7n2
Switch from returning False to raising an Error if the key doesn't check out - this provides more information

Show diffs side-by-side

added added

removed removed

Lines of Context:
281
281
        L{PKeyType.check} returns C{False} if the key is not consistent.
282
282
        """
283
283
        key = load_privatekey(FILETYPE_PEM, inconsistentPrivateKeyPEM)
284
 
        self.assertFalse(key.check())
 
284
        self.assertRaises(Error, key.check)
285
285
 
286
286
 
287
287
class X509NameTests(TestCase, _Python23TestCaseHelper):