'X509 Verify can have several failure paths.'

def testX509Verify(self):

    with utils.Stubber(rdf_crypto.RDFX509Cert, 'Verify', (lambda self, public_key=None: True)):
        self.client_communicator.LoadServerCertificate(self.server_certificate, config.CONFIG['CA.certificate'])
    def Verify(_, public_key=False):
        _ = public_key
        raise rdf_crypto.VerificationError('Testing    verification    failure.')
    with utils.Stubber(rdf_crypto.RDFX509Cert, 'Verify', Verify):
        self.assertRaises(IOError, self.client_communicator.LoadServerCertificate, self.server_certificate, config.CONFIG['CA.certificate'])
