'When model fields are not included in a serializer, then uniqueness
validators should not be added for that field.'

def test_ignore_excluded_fields(self):

    class ExcludedFieldSerializer(serializers.ModelSerializer, ):
        class Meta:
            model = UniquenessTogetherModel
            fields = ('id', 'race_name')
    serializer = ExcludedFieldSerializer()
    expected = dedent("\n                                                ExcludedFieldSerializer():\n                                                                id    =    IntegerField(label='ID',    read_only=True)\n                                                                race_name    =    CharField(max_length=100)\n                                ")
    assert (repr(serializer) == expected)
