                  self._to_xml(xml, item)
                  xml.endElement("list-item")
  
          elif isinstance(data, dict):
              for key, value in data.iteritems():
                  xml.startElement(key, {})
                  self._to_xml(xml, value)
                  xml.endElement(key)
  
          elif data is None:
 
</s> remove             for name,value in headers.iteritems():
 </s> add             for name, value in six.iteritems(headers): </s> remove         self.assertEquals(resp.content, '')
 </s> add         self.assertEquals(resp.content, six.b('')) </s> remove         self.assertEquals(resp.content, '')
 </s> add         self.assertEquals(resp.content, six.b('')) </s> remove         self.assertEqual(request.DATA.items(), data.items())
 </s> add         self.assertEqual(list(request.DATA.items()), list(data.items())) </s> remove         self.assertEqual(request.POST.items(), data.items())
 </s> add         self.assertEqual(list(request.POST.items()), list(data.items()))
            for key, value in six.iteritems(data):
                  self._to_xml(xml, item)
                  xml.endElement("list-item")
  
          elif isinstance(data, dict):
            for key, value in six.iteritems(data):
                  xml.startElement(key, {})
                  self._to_xml(xml, value)
                  xml.endElement(key)
  
          elif data is None:
keep keep keep keep replace keep keep keep keep keep
 Every (base) test should now pass with python3. 
rest_framework/utils/__init__.py