  
  from __future__ import unicode_literals
  from django.test import TestCase
  from rest_framework.compat import apply_markdown, smart_text
  from rest_framework.views import APIView
  from rest_framework.tests.description import ViewWithNonASCIICharactersInDocstring
  from rest_framework.tests.description import UTF8_TEST_DOCSTRING
  
 
</s> remove from rest_framework.settings import api_settings
from textwrap import dedent
 </s> add  </s> remove         content = re.sub(re.compile(whitespace_pattern, re.MULTILINE), '', content)
 </s> add         content = re.sub(re.compile(whitespace_pattern, re.MULTILINE), '', unicode(content))
from django.utils.encoding import python_2_unicode_compatible
  
  from __future__ import unicode_literals
  from django.test import TestCase
from django.utils.encoding import python_2_unicode_compatible
  from rest_framework.compat import apply_markdown, smart_text
  from rest_framework.views import APIView
  from rest_framework.tests.description import ViewWithNonASCIICharactersInDocstring
  from rest_framework.tests.description import UTF8_TEST_DOCSTRING
  
keep keep add keep keep keep keep keep
 Evaluate content before passing to regex.sub

Issue #1708 
rest_framework/tests/test_description.py