':py:obj:`X509Req.verify` raises :py:obj:`OpenSSL.crypto.Error` if called
with a :py:obj:`OpenSSL.crypto.PKey` which does not represent the public
part of the key which signed the request.'

def test_verify_wrong_key(self):

    request = X509Req()
    pkey = load_privatekey(FILETYPE_PEM, cleartextPrivateKeyPEM)
    request.sign(pkey, GOOD_DIGEST)
    another_pkey = load_privatekey(FILETYPE_PEM, client_key_pem)
    self.assertRaises(Error, request.verify, another_pkey)
