  from rest_framework.compat import coreapi
  from rest_framework.utils.encoders import JSONEncoder
  
  
  class MockList(object):
      def tolist(self):
          return [1, 2, 3]
  
  
  class JSONEncoderTests(TestCase):
 
</s> remove from django.utils import six, timezone
 </s> add from django.utils import timezone </s> remove from django.utils import six
 </s> add  </s> remove from django.utils import six
 </s> add  </s> remove from rest_framework.compat import MutableMapping, unicode_to_repr
 </s> add from rest_framework.compat import MutableMapping </s> remove from rest_framework.compat import postgres_fields, unicode_repr
 </s> add from rest_framework.compat import postgres_fields
class MockList:
  from rest_framework.compat import coreapi
  from rest_framework.utils.encoders import JSONEncoder
  
  
class MockList:
      def tolist(self):
          return [1, 2, 3]
  
  
  class JSONEncoderTests(TestCase):
keep keep keep keep replace keep keep keep keep keep
 Dropped Python 2 compatibility. (#6615)

Thanks to Jon Dufresne (@jdufresne) for review.

Co-authored-by: Asif Saif Uddin <auvipy@gmail.com>
Co-authored-by: Rizwan Mansuri <Rizwan@webbyfox.com> 
tests/test_encoders.py