      def test_from_native(self):
          f = serializers.TimeField()
          result = f.from_native('12:34:56')
  
          self.assertEqual(datetime.time(12, 34, 56), result)
  
      def test_from_native_datetime_time(self):
          """
          Make sure from_native() accepts a datetime.time instance.
          """
 
</s> remove         result = f.from_native('12:34:56')
 </s> add         result_1 = f.from_native('04:31')
        result_2 = f.from_native('04:31:59')
        result_3 = f.from_native('04:31:59.000200') </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.
        """ </s> remove         result = f.from_native(datetime.time(12, 34, 56))
 </s> add         result_1 = f.from_native(datetime.time(4, 31))
        result_2 = f.from_native(datetime.time(4, 31, 59))
        result_3 = f.from_native(datetime.time(4, 31, 59, 200))

        self.assertEqual(result_1, datetime.time(4, 31))
        self.assertEqual(result_2, datetime.time(4, 31, 59))
        self.assertEqual(result_3, datetime.time(4, 31, 59, 200))

    def test_from_native_custom_format(self):
        """
        Make sure from_native() accepts custom input formats.
        """
        f = serializers.TimeField(input_formats=['%H -- %M'])
        result = f.from_native('04 -- 31')

        self.assertEqual(datetime.time(4, 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.TimeField(input_formats=['%H -- %M']) </s> remove         self.assertEqual(datetime.date(1984, 7, 31), result)
 </s> add         self.assertEqual(datetime.date(1984, 7, 31), result_1) </s> remove         self.assertEqual(datetime.datetime(1984, 7, 31, 4, 31), result)
 </s> add         self.assertEqual(datetime.datetime(1984, 1, 1, 4, 59), result)
        self.assertEqual(datetime.time(4, 31), result_1)
        self.assertEqual(datetime.time(4, 31, 59), result_2)
        self.assertEqual(datetime.time(4, 31, 59, 200), result_3)
      def test_from_native(self):
          f = serializers.TimeField()
          result = f.from_native('12:34:56')
  
        self.assertEqual(datetime.time(4, 31), result_1)
        self.assertEqual(datetime.time(4, 31, 59), result_2)
        self.assertEqual(datetime.time(4, 31, 59, 200), result_3)
  
      def test_from_native_datetime_time(self):
          """
          Make sure from_native() accepts a datetime.time instance.
          """
keep keep keep keep replace keep keep keep keep keep
 Add drf settings + output format + testcases 
rest_framework/tests/fields.py