  
          try:
              f.from_native('1984-42-31 04:31')
          except validators.ValidationError as e:
              self.assertEqual(e.messages, [u'Datetime has wrong format. Use one of these formats instead:'
                                            u' YYYY-MM-DD HH:MM:SS; YYYY-MM-DD HH:MM; YYYY-MM-DD; '
                                            u'MM/DD/YYYY HH:MM:SS; MM/DD/YYYY HH:MM; MM/DD/YYYY; '
                                            u'MM/DD/YY HH:MM:SS; MM/DD/YY HH:MM; MM/DD/YY'])
          else:
              self.fail("ValidationError was not properly raised")
  
  
  class TimeFieldTest(TestCase):
 
</s> remove             self.assertEqual(e.messages, [u'Datetime has wrong format. Use one of these formats instead: '
                                          u'YYYY-MM-DD HH:MM:SS; YYYY-MM-DD HH:MM:SS.uuuuuu; YYYY-MM-DD HH:MM; '
                                          u'YYYY-MM-DD; MM/DD/YYYY HH:MM:SS; MM/DD/YYYY HH:MM:SS.uuuuuu; '
                                          u'MM/DD/YYYY HH:MM; MM/DD/YYYY; MM/DD/YY HH:MM:SS; '
                                          u'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 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> remove         self.assertEquals(serializer.errors, {'date_time': [u'Datetime has wrong format. Use one of these formats instead:'
                                                            u' YYYY-MM-DD HH:MM:SS; YYYY-MM-DD HH:MM; YYYY-MM-DD; '
                                                            u'MM/DD/YYYY HH:MM:SS; MM/DD/YYYY HH:MM; MM/DD/YYYY; '
                                                            u'MM/DD/YY HH:MM:SS; MM/DD/YY HH:MM; MM/DD/YY']})
 </s> add         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> remove         self.assertEquals(serializer.errors, {'date_time': [u'Datetime has wrong format. Use one of these formats instead: '
                                                            u'YYYY-MM-DD HH:MM:SS; YYYY-MM-DD HH:MM:SS.uuuuuu; YYYY-MM-DD HH:MM; '
                                                            u'YYYY-MM-DD; MM/DD/YYYY HH:MM:SS; MM/DD/YYYY HH:MM:SS.uuuuuu; '
                                                            u'MM/DD/YYYY HH:MM; MM/DD/YYYY; MM/DD/YY HH:MM:SS; '
                                                            u'MM/DD/YY HH:MM:SS.uuuuuu; MM/DD/YY HH:MM; MM/DD/YY']})
 </s> add         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: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> remove     def test_from_native_invalid_datetime(self):
 </s> add     def test_from_native_invalid_datetime_for_django_lt_1_4(self): </s> remove             self.assertEqual(e.messages, [u'Date has wrong format. Use one of these formats instead: '
                                          u'YYYY-MM-DD; MM/DD/YYYY; MM/DD/YY; [Jan through Dec] DD YYYY; '
                                          u'[Jan through Dec] DD, YYYY; DD [Jan through Dec] YYYY; '
                                          u'DD [Jan through Dec], YYYY; [January through December] DD YYYY; '
                                          u'[January through December] DD, YYYY; DD [January through December] YYYY; '
                                          u'DD [January through December], YYYY'])
 </s> add             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'])
            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'])
  
          try:
              f.from_native('1984-42-31 04:31')
          except validators.ValidationError as e:
            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'])
            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'])
            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'])
            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'])
          else:
              self.fail("ValidationError was not properly raised")
  
  
  class TimeFieldTest(TestCase):
keep keep keep keep replace replace replace replace keep keep keep keep keep
 Fix for python 3 support 
rest_framework/tests/fields.py