def METHOD_NAME(self):
    # Regular DRF exception handler does not return a Response for non-api
    # exceptions, but we do.
    exception_handler = api_settings.EXCEPTION_HANDLER
    with self.assertRaises(KeyError):
        with self.settings(DEBUG_PROPAGATE_EXCEPTIONS=True):
            try:
                raise KeyError()
            except Exception as exc:
                exception_handler(exc, {})