      def test_valid_custom_date_input_formats(self):
          serializer = DateObjectCustomFormatSerializer(data={'date': '1984'})
          self.assertTrue(serializer.is_valid())
  
          serializer = DateObjectCustomFormatSerializer(data={'date': '1984 -- 07'})
          self.assertTrue(serializer.is_valid())
  
      def test_wrong_default_date_input_format(self):
          serializer = DateObjectSerializer(data={'date': 'something wrong'})
          self.assertFalse(serializer.is_valid())
          self.assertEquals(serializer.errors, {'date': ['Date has wrong format. Use one of these formats instead: '
                                                         'YYYY-MM-DD; MM/DD/YYYY; MM/DD/YY; [Jan through Dec] DD YYYY; '
                                                         '[Jan through Dec] DD, YYYY; DD [Jan through Dec] YYYY; '
                                                         'DD [Jan through Dec], YYYY; [January through December] DD YYYY; '
                                                         '[January through December] DD, YYYY; DD [January through December] YYYY; '
                                                         'DD [January through December], YYYY']})
  
      def test_wrong_custom_date_input_format(self):
          serializer = DateObjectCustomFormatSerializer(data={'date': '07/31/1984'})
          self.assertFalse(serializer.is_valid())
          self.assertEquals(serializer.errors, {'date': ['Date has wrong format. Use one of these formats instead: YYYY; YYYY -- MM']})
  
      def test_from_native(self):
          f = serializers.DateField()
          result = f.from_native('1984-07-31')
  
          self.assertEqual(datetime.date(1984, 7, 31), result)
  
 
</s> remove             self.assertEqual(e.messages, ['Date has wrong format. Use one of these formats instead: '
                                          'YYYY-MM-DD; MM/DD/YYYY; MM/DD/YY; [Jan through Dec] DD YYYY; '
                                          '[Jan through Dec] DD, YYYY; DD [Jan through Dec] YYYY; '
                                          'DD [Jan through Dec], YYYY; [January through December] DD YYYY; '
                                          '[January through December] DD, YYYY; DD [January through December] YYYY; '
                                          'DD [January through December], YYYY'])
 </s> add             self.assertEqual(e.messages, ["Date has wrong format. Use one of these formats instead: YYYY-MM-DD"]) </s> remove             f.from_native('1984-42-31')
 </s> add             f.from_native('1984-13-31') </s> remove         result = f.from_native('1984-07-31')
 </s> add         result_1 = f.from_native('1984-07-31') </s> remove     @unittest.skipUnless(django.VERSION < (1, 4), "django >= 1.4 have microseconds in default settings")
    def test_wrong_default_date_time_input_format_for_django_lt_1_4(self):
        serializer = DateTimeObjectSerializer(data={'date_time': 'something wrong'})
        self.assertFalse(serializer.is_valid())
        self.assertEquals(serializer.errors, {'date_time': ['Datetime has wrong format. Use one of these formats instead: '
                                                            'YYYY-MM-DD HH:MM:SS; YYYY-MM-DD HH:MM; YYYY-MM-DD; '
                                                            'MM/DD/YYYY HH:MM:SS; MM/DD/YYYY HH:MM; MM/DD/YYYY; '
                                                            'MM/DD/YY HH:MM:SS; MM/DD/YY HH:MM; MM/DD/YY']})
 </s> add     def test_from_native_datetime_datetime(self):
        """
        Make sure from_native() accepts a datetime.datetime instance.
        """
        f = serializers.DateTimeField()
        result_1 = f.from_native(datetime.datetime(1984, 7, 31))
        result_2 = f.from_native(datetime.datetime(1984, 7, 31, 4, 31))
        result_3 = f.from_native(datetime.datetime(1984, 7, 31, 4, 31, 59))
        result_4 = f.from_native(datetime.datetime(1984, 7, 31, 4, 31, 59, 200)) </s> remove     def test_wrong_custom_date_time_input_format(self):
        serializer = DateTimeObjectCustomFormatSerializer(data={'date_time': '07/31/84 04:31'})
        self.assertFalse(serializer.is_valid())
        self.assertEquals(serializer.errors, {'date_time': ['Datetime has wrong format. Use one of these formats instead: YYYY; YYYY HH:MM']})
 </s> add         self.assertEqual(result_1, datetime.datetime(1984, 7, 31))
        self.assertEqual(result_2, datetime.datetime(1984, 7, 31, 4, 31))
        self.assertEqual(result_3, datetime.datetime(1984, 7, 31, 4, 31, 59))
        self.assertEqual(result_4, datetime.datetime(1984, 7, 31, 4, 31, 59, 200))
    def test_from_native_string(self):
        """
        Make sure from_native() accepts default iso input formats.
        """
      def test_valid_custom_date_input_formats(self):
          serializer = DateObjectCustomFormatSerializer(data={'date': '1984'})
          self.assertTrue(serializer.is_valid())
  
    def test_from_native_string(self):
        """
        Make sure from_native() accepts default iso input formats.
        """
    def test_from_native_string(self):
        """
        Make sure from_native() accepts default iso input formats.
        """
    def test_from_native_string(self):
        """
        Make sure from_native() accepts default iso input formats.
        """
    def test_from_native_string(self):
        """
        Make sure from_native() accepts default iso input formats.
        """
    def test_from_native_string(self):
        """
        Make sure from_native() accepts default iso input formats.
        """
    def test_from_native_string(self):
        """
        Make sure from_native() accepts default iso input formats.
        """
    def test_from_native_string(self):
        """
        Make sure from_native() accepts default iso input formats.
        """
    def test_from_native_string(self):
        """
        Make sure from_native() accepts default iso input formats.
        """
    def test_from_native_string(self):
        """
        Make sure from_native() accepts default iso input formats.
        """
    def test_from_native_string(self):
        """
        Make sure from_native() accepts default iso input formats.
        """
    def test_from_native_string(self):
        """
        Make sure from_native() accepts default iso input formats.
        """
    def test_from_native_string(self):
        """
        Make sure from_native() accepts default iso input formats.
        """
    def test_from_native_string(self):
        """
        Make sure from_native() accepts default iso input formats.
        """
    def test_from_native_string(self):
        """
        Make sure from_native() accepts default iso input formats.
        """
    def test_from_native_string(self):
        """
        Make sure from_native() accepts default iso input formats.
        """
    def test_from_native_string(self):
        """
        Make sure from_native() accepts default iso input formats.
        """
    def test_from_native_string(self):
        """
        Make sure from_native() accepts default iso input formats.
        """
    def test_from_native_string(self):
        """
        Make sure from_native() accepts default iso input formats.
        """
    def test_from_native_string(self):
        """
        Make sure from_native() accepts default iso input formats.
        """
          f = serializers.DateField()
          result = f.from_native('1984-07-31')
  
          self.assertEqual(datetime.date(1984, 7, 31), result)
  
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 Add drf settings + output format + testcases 
rest_framework/tests/fields.py