2016-09-20 22:51:11 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
2016-11-10 19:30:09 +01:00
|
|
|
from zerver.lib.test_classes import WebhookTestCase
|
2016-09-20 22:51:11 +02:00
|
|
|
|
|
|
|
class SentryHookTests(WebhookTestCase):
|
|
|
|
STREAM_NAME = 'sentry'
|
|
|
|
URL_TEMPLATE = "/api/v1/external/sentry?&api_key={api_key}"
|
|
|
|
FIXTURE_DIR_NAME = 'sentry'
|
|
|
|
|
2017-11-04 07:47:46 +01:00
|
|
|
def test_error_issue_message(self) -> None:
|
2016-09-20 22:51:11 +02:00
|
|
|
expected_subject = u"zulip"
|
|
|
|
expected_message = u"New ERROR [issue](https://sentry.io/zulip/zulip/issues/156699934/): This is an example python exception."
|
|
|
|
self.send_and_test_stream_message(
|
|
|
|
'exception_message',
|
|
|
|
expected_subject,
|
|
|
|
expected_message
|
|
|
|
)
|