':py:meth:`X509Req.sign` raises :py:exc:`ValueError` when passed a digest name which is
not known.'

def test_signWithUnknownDigest(self):

    request = self.signable()
    key = PKey()
    key.generate_key(TYPE_RSA, 512)
    self.assertRaises(ValueError, request.sign, key, BAD_DIGEST)
