  from django.utils import six, translation
  from django.utils.translation import ugettext_lazy as _
  
  from rest_framework.exceptions import (
      APIException, ErrorDetail, Throttled, _get_error_details
  )
  
  
  class ExceptionTestCase(TestCase):
  
 
</s> remove from django.test import TestCase
 </s> add from django.test import RequestFactory, TestCase
    APIException, ErrorDetail, Throttled, _get_error_details, bad_request,
    server_error
  from django.utils import six, translation
  from django.utils.translation import ugettext_lazy as _
  
  from rest_framework.exceptions import (
    APIException, ErrorDetail, Throttled, _get_error_details, bad_request,
    server_error
  )
  
  
  class ExceptionTestCase(TestCase):
  
keep keep keep keep replace keep keep keep keep keep
 Added generic 500 and 400 JSON error handlers. (#5904)

* Added generic 500 and 400 JSON error handlers.
* Docs for generic error views. 
tests/test_exceptions.py