          '2017-03-12T02:30:00': ['Invalid datetime for the timezone "America/New_York".'],
          '2017-11-05T01:30:00': ['Invalid datetime for the timezone "America/New_York".']
      }
      outputs = {}
      field = serializers.DateTimeField(default_timezone=pytz.timezone('America/New_York'))
  
  
  class TestTimeField(FieldValues):
      """
      Valid and invalid values for `TimeField`.
 
</s> remove pytz==2016.10
 </s> add  </s> remove             except Exception:
 </s> add             except InvalidTimeError: </s> remove from rest_framework import serializers
 </s> add from rest_framework import compat, serializers </s> remove from django.utils.timezone import pytz, utc
 </s> add from django.utils.timezone import utc
    class MockTimezone:
        @staticmethod
        def localize(value, is_dst):
            raise compat.InvalidTimeError()

        def __str__(self):
            return 'America/New_York'

    field = serializers.DateTimeField(default_timezone=MockTimezone())
          '2017-03-12T02:30:00': ['Invalid datetime for the timezone "America/New_York".'],
          '2017-11-05T01:30:00': ['Invalid datetime for the timezone "America/New_York".']
      }
      outputs = {}
    class MockTimezone:
        @staticmethod
        def localize(value, is_dst):
            raise compat.InvalidTimeError()

        def __str__(self):
            return 'America/New_York'

    field = serializers.DateTimeField(default_timezone=MockTimezone())
  
  
  class TestTimeField(FieldValues):
      """
      Valid and invalid values for `TimeField`.
keep keep keep keep replace keep keep keep keep keep
 Added pytz exception in compat module.
Mock pytz.timezone localize in tests.
Ref: #4986 
tests/test_fields.py