  
  DUMMYSTATUS = status.HTTP_200_OK
  DUMMYCONTENT = 'dummycontent'
  
  RENDERER_A_SERIALIZER = lambda x: 'Renderer A: %s' % x
  RENDERER_B_SERIALIZER = lambda x: 'Renderer B: %s' % x
  
  
  expected_results = [
      ((elem for elem in [1, 2, 3]), JSONRenderer, '[1, 2, 3]')  # Generator
  ]
 
</s> remove RENDERER_A_SERIALIZER = lambda x: 'Renderer A: %s' % x
RENDERER_B_SERIALIZER = lambda x: 'Renderer B: %s' % x
 </s> add RENDERER_A_SERIALIZER = lambda x: ('Renderer A: %s' % x).encode('ascii')
RENDERER_B_SERIALIZER = lambda x: ('Renderer B: %s' % x).encode('ascii') </s> remove         self.assertEquals(resp.content, '%s(%s);' % (callback_func, _flat_repr))
 </s> add         self.assertEquals(resp.content,
            ('%s(%s);' % (callback_func, _flat_repr)).encode('ascii')) </s> remove             for name,value in headers.iteritems():
 </s> add             for name, value in six.iteritems(headers): </s> remove         self.assertEquals(resp.content, 'callback(%s);' % _flat_repr)
 </s> add         self.assertEquals(resp.content,
            ('callback(%s);' % _flat_repr).encode('ascii')) </s> remove         self.assertEquals(resp.content, 'callback(%s);' % _flat_repr)
 </s> add         self.assertEquals(resp.content,
            ('callback(%s);' % _flat_repr).encode('ascii'))
RENDERER_A_SERIALIZER = lambda x: ('Renderer A: %s' % x).encode('ascii')
RENDERER_B_SERIALIZER = lambda x: ('Renderer B: %s' % x).encode('ascii')
  
  DUMMYSTATUS = status.HTTP_200_OK
  DUMMYCONTENT = 'dummycontent'
  
RENDERER_A_SERIALIZER = lambda x: ('Renderer A: %s' % x).encode('ascii')
RENDERER_B_SERIALIZER = lambda x: ('Renderer B: %s' % x).encode('ascii')
RENDERER_A_SERIALIZER = lambda x: ('Renderer A: %s' % x).encode('ascii')
RENDERER_B_SERIALIZER = lambda x: ('Renderer B: %s' % x).encode('ascii')
  
  
  expected_results = [
      ((elem for elem in [1, 2, 3]), JSONRenderer, '[1, 2, 3]')  # Generator
  ]
keep keep keep keep replace replace keep keep keep keep keep
 Every (base) test should now pass with python3. 
rest_framework/tests/renderers.py