  import re
  
  from django.conf.urls.defaults import patterns, url, include
  from django.test import TestCase
  
  from rest_framework import status, permissions
  from rest_framework.compat import yaml
  from rest_framework.response import Response
 
</s> remove from rest_framework import status
 </s> add from rest_framework import status, permissions </s> remove         # form = self.get_bound_form()
        # if form is not None:
 </s> add         # serializer = self.get_serializer()
        # if serializer is not None: </s> remove         self.check_permissions(request)
 </s> add         if not self.has_permission(request):
            self.permission_denied(request) </s> remove     def _get_generic_content_form(self, view):
 </s> add     def get_generic_content_form(self, view):
from django.test.client import RequestFactory
  import re
  
  from django.conf.urls.defaults import patterns, url, include
  from django.test import TestCase
from django.test.client import RequestFactory
  
  from rest_framework import status, permissions
  from rest_framework.compat import yaml
  from rest_framework.response import Response
keep keep keep add keep keep keep keep
 Only display forms when user has permissions.  #159 
rest_framework/tests/renderers.py