          """
          f = serializers.DateField()
          result = f.from_native(datetime.date(1984, 7, 31))
  
          self.assertEqual(result, datetime.date(1984, 7, 31))
  
      def test_from_native_empty(self):
          f = serializers.DateField()
          result = f.from_native('')
  
 
</s> remove         result = f.from_native(datetime.date(1984, 7, 31))
 </s> add         result_1 = f.from_native(datetime.date(1984, 7, 31))

        self.assertEqual(result_1, datetime.date(1984, 7, 31))

    def test_from_native_custom_format(self):
        """
        Make sure from_native() accepts custom input formats.
        """
        f = serializers.DateField(input_formats=['%Y -- %d'])
        result = f.from_native('1984 -- 31') </s> remove         self.assertEqual(result, datetime.datetime(1984, 7, 31))
 </s> add         try:
            f.from_native('1984-07-31 04:31:59')
        except validators.ValidationError as e:
            self.assertEqual(e.messages, ["Datetime has wrong format. Use one of these formats instead: YYYY -- HH:MM"])
        else:
            self.fail("ValidationError was not properly raised") </s> remove         f = serializers.DateTimeField()
        result = f.from_native(datetime.datetime(1984, 7, 31))
 </s> add         f = serializers.DateTimeField(input_formats=['%Y -- %H:%M']) </s> remove         Make sure from_native() accepts a datetime.date instance.
 </s> add         Make sure from_native() don't accept default formats if custom format is preset
        self.assertEqual(datetime.date(1984, 1, 31), result)

    def test_from_native_invalid_default_on_custom_format(self):
        """
        Make sure from_native() don't accept default formats if custom format is preset
        """
        f = serializers.DateField(input_formats=['%Y -- %d'])

        try:
            f.from_native('1984-07-31')
        except validators.ValidationError as e:
            self.assertEqual(e.messages, ["Date has wrong format. Use one of these formats instead: YYYY -- DD"])
        else:
            self.fail("ValidationError was not properly raised")
          """
          f = serializers.DateField()
          result = f.from_native(datetime.date(1984, 7, 31))
  
        self.assertEqual(datetime.date(1984, 1, 31), result)

    def test_from_native_invalid_default_on_custom_format(self):
        """
        Make sure from_native() don't accept default formats if custom format is preset
        """
        f = serializers.DateField(input_formats=['%Y -- %d'])

        try:
            f.from_native('1984-07-31')
        except validators.ValidationError as e:
            self.assertEqual(e.messages, ["Date has wrong format. Use one of these formats instead: YYYY -- DD"])
        else:
            self.fail("ValidationError was not properly raised")
  
      def test_from_native_empty(self):
          f = serializers.DateField()
          result = f.from_native('')
  
keep keep keep keep replace keep keep keep keep keep
 Add drf settings + output format + testcases 
rest_framework/tests/fields.py