':py:obj:`dump_privatekey` raises :py:obj:`ValueError` if called with an unrecognized
cipher name.'

def test_dump_privatekey_unknown_cipher(self):

    key = PKey()
    key.generate_key(TYPE_RSA, 512)
    self.assertRaises(ValueError, dump_privatekey, FILETYPE_PEM, key, BAD_CIPHER, 'passphrase')
