There used to be tests before a voter could register to vote back in the early 1900s. The Supreme Courts said it wasn't legal because it discriminate against minorities that was typical in those days to be uneducated.
It depends on who made out the test as to who gets discriminated against. If a conservative made it out one question that would be a must on there is "Do you know what a Socialist is?" that would have dis-qualified many liberals from voting.