          data = {'race_name': 'bar'}
          queryset = MockQueryset()
          validator = UniqueTogetherValidator(queryset, fields=('race_name',
                                                                'position'))
          validator.instance = self.instance
          validator.filter_queryset(attrs=data, queryset=queryset)
          assert queryset.called_with == {'race_name': 'bar', 'position': 1}
  
  
  # Tests for `UniqueForDateValidator`
  # ----------------------------------
 
</s> remove     def __call__(self, attrs):
 </s> add     def __call__(self, attrs, serializer):
        # Determine the underlying model field names. These may not be the
        # same as the serializer field names if `source=<>` is set.
        field_name = serializer.fields[self.field].source_attrs[-1]
        date_field_name = serializer.fields[self.date_field].source_attrs[-1]
        # Determine the existing instance, if this is an update operation.
        instance = getattr(serializer, 'instance', None)
 </s> remove     def __call__(self, value):
 </s> add     def __call__(self, value, serializer_field):
        # Determine the underlying model field name. This may not be the
        # same as the serializer field name if `source=<>` is set.
        field_name = serializer_field.source_attrs[-1]
        # Determine the existing instance, if this is an update operation.
        instance = getattr(serializer_field.parent, 'instance', None)
 </s> remove                     attrs[field_name] = getattr(self.instance, field_name)
 </s> add                     attrs[field_name] = getattr(instance, field_name) </s> remove     def set_context(self, serializer_field):
        """
        This hook is called by the serializer instance,
        prior to the validation call being made.
        """
        # Determine the underlying model field name. This may not be the
        # same as the serializer field name if `source=<>` is set.
        self.field_name = serializer_field.source_attrs[-1]
        # Determine the existing instance, if this is an update operation.
        self.instance = getattr(serializer_field.parent, 'instance', None)

    def filter_queryset(self, value, queryset):
 </s> add     def filter_queryset(self, value, queryset, field_name): </s> remove             validator.filter_queryset(attrs=None, queryset=None)
 </s> add             validator.filter_queryset(
                attrs=None, queryset=None, field_name='', date_field_name=''
            )
        validator.filter_queryset(attrs=data, queryset=queryset, instance=self.instance)
          data = {'race_name': 'bar'}
          queryset = MockQueryset()
          validator = UniqueTogetherValidator(queryset, fields=('race_name',
                                                                'position'))
        validator.filter_queryset(attrs=data, queryset=queryset, instance=self.instance)
        validator.filter_queryset(attrs=data, queryset=queryset, instance=self.instance)
          assert queryset.called_with == {'race_name': 'bar', 'position': 1}
  
  
  # Tests for `UniqueForDateValidator`
  # ----------------------------------
keep keep keep keep replace replace keep keep keep keep keep
 Drop `set_context()` (#7062)

* Do not persist the context in validators

Fixes encode/django-rest-framework#5760

* Drop set_context() in favour of 'requires_context = True' 
tests/test_validators.py