'When serializer fields are read only, then uniqueness
validators should not be added for that field.'

def test_ignore_read_only_fields(self):

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