def METHOD_NAME(self):
    exception_handler = api_settings.EXCEPTION_HANDLER
    with self.settings(DEBUG_PROPAGATE_EXCEPTIONS=False):
        try:
            raise PermissionDenied()
        except Exception as exc:
            response = exception_handler(exc, {})
            assert isinstance(response, Response)
            assert response.status_code == 403