def test_does_exclude_filtered_types(self, get_option, exc_info, captureException): exc_info.return_value = self.exc_info get_option.return_value = ['ValueError'] sentry_exception_handler(request=self.request) assert not captureException.called
def test_ignore_exceptions_with_module_match(self, get_option, exc_info, captureException): exc_info.return_value = self.exc_info get_option.return_value = ['builtins.ValueError'] if not six.PY3: get_option.return_value = ['exceptions.ValueError'] sentry_exception_handler(request=self.request) assert not captureException.called
def test_does_capture_exception(self, exc_info, captureException): exc_info.return_value = self.exc_info sentry_exception_handler(request=self.request) captureException.assert_called_once_with(exc_info=self.exc_info, request=self.request)