      def test_valid_custom_time_input_formats(self):
          serializer = TimeObjectCustomFormatSerializer(data={'time': '04 -- 31'})
          self.assertTrue(serializer.is_valid())
  
          serializer = TimeObjectCustomFormatSerializer(data={'time': '043159'})
          self.assertTrue(serializer.is_valid())
  
      def test_wrong_default_time_input_format(self):
          serializer = TimeObjectSerializer(data={'time': 'something wrong'})
          self.assertFalse(serializer.is_valid())
          self.assertEquals(serializer.errors, {'time': ['Time has wrong format. Use one of these formats instead: HH:MM:SS; HH:MM']})
 
</s> remove     def test_wrong_default_time_input_format(self):
        serializer = TimeObjectSerializer(data={'time': 'something wrong'})
        self.assertFalse(serializer.is_valid())
        self.assertEquals(serializer.errors, {'time': ['Time has wrong format. Use one of these formats instead: HH:MM:SS; HH:MM']})
 </s> add         self.assertEqual('1984 - 00:00', result_1)
        self.assertEqual('1984 - 04:31', result_2)
        self.assertEqual('1984 - 04:31', result_3)
        self.assertEqual('1984 - 04:31', result_4) </s> remove     def test_wrong_custom_time_input_format(self):
        serializer = TimeObjectCustomFormatSerializer(data={'time': '04:31'})
        self.assertFalse(serializer.is_valid())
        self.assertEquals(serializer.errors, {'time': ['Time has wrong format. Use one of these formats instead: HH -- MM; HHMMSS']})
 </s> add  </s> remove     def test_valid_custom_time_input_formats(self):
        serializer = TimeObjectCustomFormatSerializer(data={'time': '04 -- 31'})
        self.assertTrue(serializer.is_valid())
 </s> add     def test_to_native_custom_format(self):
        """
        Make sure to_native() returns correct custom format.
        """
        f = serializers.DateTimeField(output_format="%Y - %H:%M") </s> remove         serializer = TimeObjectSerializer(data={'time': '04:31:59'})
        self.assertTrue(serializer.is_valid())
 </s> add         self.assertEqual('1984-07-31T00:00:00', result_1)
        self.assertEqual('1984-07-31T04:31:00', result_2)
        self.assertEqual('1984-07-31T04:31:59', result_3)
        self.assertEqual('1984-07-31T04:31:59.000200', result_4) </s> remove     def test_from_native(self):
 </s> add class TimeFieldTest(TestCase):
    """
    Tests for the TimeField from_native() and to_native() behavior
    """

    def test_from_native_string(self):
        """
        Make sure from_native() accepts default iso input formats.
        """
        result_1 = f.to_native(datetime.datetime(1984, 7, 31))
        result_2 = f.to_native(datetime.datetime(1984, 7, 31, 4, 31))
        result_3 = f.to_native(datetime.datetime(1984, 7, 31, 4, 31, 59))
        result_4 = f.to_native(datetime.datetime(1984, 7, 31, 4, 31, 59, 200))
      def test_valid_custom_time_input_formats(self):
          serializer = TimeObjectCustomFormatSerializer(data={'time': '04 -- 31'})
          self.assertTrue(serializer.is_valid())
  
        result_1 = f.to_native(datetime.datetime(1984, 7, 31))
        result_2 = f.to_native(datetime.datetime(1984, 7, 31, 4, 31))
        result_3 = f.to_native(datetime.datetime(1984, 7, 31, 4, 31, 59))
        result_4 = f.to_native(datetime.datetime(1984, 7, 31, 4, 31, 59, 200))
        result_1 = f.to_native(datetime.datetime(1984, 7, 31))
        result_2 = f.to_native(datetime.datetime(1984, 7, 31, 4, 31))
        result_3 = f.to_native(datetime.datetime(1984, 7, 31, 4, 31, 59))
        result_4 = f.to_native(datetime.datetime(1984, 7, 31, 4, 31, 59, 200))
  
      def test_wrong_default_time_input_format(self):
          serializer = TimeObjectSerializer(data={'time': 'something wrong'})
          self.assertFalse(serializer.is_valid())
          self.assertEquals(serializer.errors, {'time': ['Time has wrong format. Use one of these formats instead: HH:MM:SS; HH:MM']})
keep keep keep keep replace replace keep keep keep keep keep
 Add drf settings + output format + testcases 
rest_framework/tests/fields.py