  
          try:
              f.from_native('1984-42-31')
          except validators.ValidationError as e:
              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'])
          else:
              self.fail("ValidationError was not properly raised")
  
  
  class DateTimeFieldTest(TestCase):
 
</s> remove             f.from_native('1984-42-31')
 </s> add             f.from_native('1984-13-31') </s> remove         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):
 </s> add     def test_from_native_string(self):
        """
        Make sure from_native() accepts default iso input formats.
        """ </s> remove             self.assertEqual(e.messages, ['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             self.assertEqual(e.messages, ["Datetime has wrong format. Use one of these formats instead: "
                                          "YYYY-MM-DD; YYYY-MM-DD HH:MM; YYYY-MM-DD HH:MM:SS; "
                                          "YYYY-MM-DD HH:MM:SS.uuuuuu"]) </s> remove             self.assertEqual(e.messages, ['Datetime has wrong format. Use one of these formats instead: '
                                          'YYYY-MM-DD HH:MM:SS; YYYY-MM-DD HH:MM:SS.uuuuuu; YYYY-MM-DD HH:MM; '
                                          'YYYY-MM-DD; MM/DD/YYYY HH:MM:SS; MM/DD/YYYY HH:MM:SS.uuuuuu; '
                                          'MM/DD/YYYY HH:MM; MM/DD/YYYY; MM/DD/YY HH:MM:SS; '
                                          'MM/DD/YY HH:MM:SS.uuuuuu; MM/DD/YY HH:MM; MM/DD/YY'])
 </s> add             self.assertEqual(e.messages, ["Datetime has wrong format. Use one of these formats instead: "
                                          "YYYY-MM-DD; YYYY-MM-DD HH:MM; YYYY-MM-DD HH:MM:SS; "
                                          "YYYY-MM-DD HH:MM:SS.uuuuuu"]) </s> remove             f.from_native('1984-42-31 04:31')
 </s> add             f.from_native('04:61:59')
            self.assertEqual(e.messages, ["Date has wrong format. Use one of these formats instead: YYYY-MM-DD"])
  
          try:
              f.from_native('1984-42-31')
          except validators.ValidationError as e:
            self.assertEqual(e.messages, ["Date has wrong format. Use one of these formats instead: YYYY-MM-DD"])
            self.assertEqual(e.messages, ["Date has wrong format. Use one of these formats instead: YYYY-MM-DD"])
            self.assertEqual(e.messages, ["Date has wrong format. Use one of these formats instead: YYYY-MM-DD"])
            self.assertEqual(e.messages, ["Date has wrong format. Use one of these formats instead: YYYY-MM-DD"])
            self.assertEqual(e.messages, ["Date has wrong format. Use one of these formats instead: YYYY-MM-DD"])
            self.assertEqual(e.messages, ["Date has wrong format. Use one of these formats instead: YYYY-MM-DD"])
          else:
              self.fail("ValidationError was not properly raised")
  
  
  class DateTimeFieldTest(TestCase):
keep keep keep keep replace replace replace replace replace replace keep keep keep keep keep
 Add drf settings + output format + testcases 
rest_framework/tests/fields.py