':py:obj:`X509.digest` raises :py:obj:`ValueError` if called with an unrecognized hash
algorithm.'

def test_invalid_digest_algorithm(self):

    cert = X509()
    self.assertRaises(ValueError, cert.digest, BAD_DIGEST)
