Пример #1
0
    def test_main(self):
        sentry = get_sentry()
        try:
            raise Exception
        except Exception:
            exc_info = sys.exc_info()

        try:
            err = sentry.capture(exc_info)
        except SentryError:
            return

        assert isinstance(err, CapturedException)
        assert isinstance(err.get_report(), str)

        err.set_comment(u"foo")
        err.set_comment(u"bar")
Пример #2
0
    def test_main(self):
        sentry = get_sentry()
        try:
            raise Exception
        except Exception:
            exc_info = sys.exc_info()

        try:
            err = sentry.capture(exc_info)
        except SentryError:
            return

        assert isinstance(err, CapturedException)
        assert isinstance(err.get_report(), text_type)

        err.set_comment(u"foo")
        err.set_comment(u"bar")