def METHOD_NAME(b_mock, new_validator, node_key):
    from bigchaindb.common.exceptions import InvalidPublicKey
    for iv in ['ed25519-base32', 'ed25519-base64']:
        new_validator['public_key']['type'] = iv
        voters = ValidatorElection.recipients(b_mock)
        with pytest.raises(InvalidPublicKey):
            ValidatorElection.generate([node_key.public_key],
                                       voters,
                                       new_validator, None).sign([node_key.private_key])