':py:obj:`load_privatekey` raises :py:obj:`OpenSSL.crypto.Error` when it
is passed an encrypted PEM and a passphrase callback which returns an
incorrect passphrase.'

def test_load_privatekey_wrongPassphraseCallback(self):

    called = []
    def cb(*a):
        called.append(None)
        return b('quack')
    self.assertRaises(Error, load_privatekey, FILETYPE_PEM, encryptedPrivateKeyPEM, cb)
    self.assertTrue(called)
