  #        (data, files) = MultiPartParser(view).parse(StringIO(self.body))
  #        self.assertEqual(data['key1'], 'val1')
  #        self.assertEqual(files['file1'].read(), 'blablabla')
  
  from StringIO import StringIO
  from django import forms
  from django.test import TestCase
  from rest_framework.parsers import FormParser
  from rest_framework.parsers import XMLParser
  import datetime
 
</s> remove from StringIO import StringIO
 </s> add from rest_framework.compat import StringIO </s> remove import StringIO
 </s> add from rest_framework.compat import StringIO
 </s> remove     import StringIO
 </s> add     from six import StringIO </s> remove from django.utils.encoding import smart_unicode
 </s> add try:
    from django.utils.encoding import smart_text
except ImportError:
    from django.utils.encoding import smart_unicode as smart_text </s> remove from StringIO import StringIO
 </s> add from rest_framework.compat import StringIO
from rest_framework.compat import StringIO
  #        (data, files) = MultiPartParser(view).parse(StringIO(self.body))
  #        self.assertEqual(data['key1'], 'val1')
  #        self.assertEqual(files['file1'].read(), 'blablabla')
  
from rest_framework.compat import StringIO
  from django import forms
  from django.test import TestCase
  from rest_framework.parsers import FormParser
  from rest_framework.parsers import XMLParser
  import datetime
keep keep keep keep replace keep keep keep keep keep
 First passing test under p3k \o/ 
rest_framework/tests/parsers.py