':py:obj:`dump_privatekey` raises :py:obj:`TypeError` if called with a passphrase which
is neither a :py:obj:`str` nor a callable.'

def test_dump_privatekey_invalid_passphrase_type(self):

    key = PKey()
    key.generate_key(TYPE_RSA, 512)
    self.assertRaises(TypeError, dump_privatekey, FILETYPE_PEM, key, GOOD_CIPHER, object())
