  
          if (field_timezone is not None) and not timezone.is_aware(value):
              try:
                  return timezone.make_aware(value, field_timezone)
              except Exception:
                  self.fail('make_aware', timezone=field_timezone)
          elif (field_timezone is None) and timezone.is_aware(value):
              return timezone.make_naive(value, utc)
          return value
  
 
</s> remove     field = serializers.DateTimeField(default_timezone=pytz.timezone('America/New_York'))
 </s> add     class MockTimezone:
        @staticmethod
        def localize(value, is_dst):
            raise compat.InvalidTimeError()

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

    field = serializers.DateTimeField(default_timezone=MockTimezone()) </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 </s> remove     get_remote_field, unicode_repr, unicode_to_repr, value_from_object
 </s> add     InvalidTimeError, get_remote_field, unicode_repr, unicode_to_repr,
    value_from_object
            except InvalidTimeError:
  
          if (field_timezone is not None) and not timezone.is_aware(value):
              try:
                  return timezone.make_aware(value, field_timezone)
            except InvalidTimeError:
                  self.fail('make_aware', timezone=field_timezone)
          elif (field_timezone is None) and timezone.is_aware(value):
              return timezone.make_naive(value, utc)
          return value
  
keep keep keep keep replace keep keep keep keep keep
 Added pytz exception in compat module.
Mock pytz.timezone localize in tests.
Ref: #4986 
rest_framework/fields.py