  from django.test import TestCase
  from django.test.client import RequestFactory
  from rest_framework.negotiation import DefaultContentNegotiation
  from rest_framework.request import Request
  
  
  factory = RequestFactory()
  
  
 
</s> remove class MockJSONRenderer(object):
 </s> add class MockJSONRenderer(BaseRenderer): </s> remove                 request.accepted_renderer, request.accepted_media_type = neg
 </s> add                 renderer, media_type, charset = neg
                request.accepted_renderer = renderer
                request.accepted_media_type = media_type 
from rest_framework.renderers import BaseRenderer
  from django.test import TestCase
  from django.test.client import RequestFactory
  from rest_framework.negotiation import DefaultContentNegotiation
  from rest_framework.request import Request
from rest_framework.renderers import BaseRenderer
  
  
  factory = RequestFactory()
  
  
keep keep keep add keep keep keep keep keep
 charset param gets now appended to response's Content-Type. Closes #807 
rest_framework/tests/negotiation.py