              'position': 1
          }
  
      def test_ignore_excluded_fields(self):
          """
          When model fields are not included in a serializer, then uniqueness
          validtors should not be added for that field.
          """
 
</s> remove         queryset = self.queryset.filter(**filter_kwargs)
 </s> add     def exclude_current_instance(self, attrs, queryset):
        """
        If an instance is being updated, then do not include
        that instance itself as a uniqueness conflict.
        """ </s> remove     def get_filter_kwargs(self, attrs):
        raise NotImplementedError('`get_filter_kwargs` must be implemented.')
 </s> add     def enforce_required_fields(self, attrs):
        """
        The `UniqueFor<Range>Validator` classes always force an implied
        'required' state on the fields they are applied to.
        """
        missing = dict([
            (field_name, self.missing_message)
            for field_name in [self.field, self.date_field]
            if field_name not in attrs
        ])
        if missing:
            raise ValidationError(missing) </s> remove     def __call__(self, attrs):
        filter_kwargs = self.get_filter_kwargs(attrs)
 </s> add     def filter_queryset(self, attrs, queryset):
        raise NotImplementedError('`filter_queryset` must be implemented.') </s> remove     def get_filter_kwargs(self, attrs):
 </s> add     def filter_queryset(self, attrs, queryset): </s> remove     def get_filter_kwargs(self, attrs):
 </s> add     def filter_queryset(self, attrs, queryset):
    def test_unique_together_is_required(self):
        """
        In a unique together validation, all fields are required.
        """
        data = {'position': 2}
        serializer = UniquenessTogetherSerializer(data=data, partial=True)
        assert not serializer.is_valid()
        assert serializer.errors == {
            'race_name': ['This field is required.']
        }

              'position': 1
          }
  
    def test_unique_together_is_required(self):
        """
        In a unique together validation, all fields are required.
        """
        data = {'position': 2}
        serializer = UniquenessTogetherSerializer(data=data, partial=True)
        assert not serializer.is_valid()
        assert serializer.errors == {
            'race_name': ['This field is required.']
        }

      def test_ignore_excluded_fields(self):
          """
          When model fields are not included in a serializer, then uniqueness
          validtors should not be added for that field.
          """
keep keep add keep keep keep keep keep
 Uniqueness constraints imply a forced 'required=True'. Refs #1945 
tests/test_validators.py