                  self.instance = instance
  
          data = {'race_name': 'bar'}
          queryset = MockQueryset()
          serializer = MockSerializer(instance=self.instance)
          validator = UniqueTogetherValidator(queryset, fields=('race_name',
                                                                'position'))
          validator.filter_queryset(attrs=data, queryset=queryset, serializer=serializer)
          assert queryset.called_with == {'race_name': 'bar', 'position': 1}
  
 
</s> remove         class MockSerializer:
            def __init__(self, instance):
                self.instance = instance

 </s> add  </s> remove             defaults[field.field_name] = default
 </s> add             defaults[field.source] = default </s> remove             for field_name in self.fields:
                if field_name not in attrs:
                    attrs[field_name] = getattr(serializer.instance, field_name)
 </s> add             for source in sources:
                if source not in attrs:
                    attrs[source] = getattr(serializer.instance, source) </s> remove             field_name: attrs[field_name]
            for field_name in self.fields
 </s> add             source: attrs[source]
            for source in sources </s> remove             if field_name not in attrs
 </s> add             if serializer.fields[field_name].source not in attrs
        serializer = UniquenessTogetherSerializer(instance=self.instance)
                  self.instance = instance
  
          data = {'race_name': 'bar'}
          queryset = MockQueryset()
        serializer = UniquenessTogetherSerializer(instance=self.instance)
          validator = UniqueTogetherValidator(queryset, fields=('race_name',
                                                                'position'))
          validator.filter_queryset(attrs=data, queryset=queryset, serializer=serializer)
          assert queryset.called_with == {'race_name': 'bar', 'position': 1}
  
keep keep keep keep replace keep keep keep keep keep
 Fix UniqueTogetherValidator with field sources (#7086)

* Add failing tests for unique_together+source

* Fix UniqueTogetherValidator source handling

* Fix read-only+default+source handling

* Update test to use functional serializer

* Test UniqueTogetherValidator error+source 
tests/test_validators.py