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
|
|
|
|
2020-01-14 22:06:24 +01:00
|
|
|
|
2016-09-20 22:51:11 +02:00
|
|
|
class AirbrakeHookTests(WebhookTestCase):
|
|
|
|
STREAM_NAME = 'airbrake'
|
|
|
|
URL_TEMPLATE = u"/api/v1/external/airbrake?stream={stream}&api_key={api_key}"
|
|
|
|
FIXTURE_DIR_NAME = 'airbrake'
|
|
|
|
|
2017-11-04 07:47:46 +01:00
|
|
|
def test_airbrake_error_message(self) -> None:
|
2018-11-09 20:33:58 +01:00
|
|
|
expected_topic = u"ZulipIntegrationTest"
|
2016-09-20 22:51:11 +02:00
|
|
|
expected_message = u"[ZeroDivisionError](https://zulip.airbrake.io/projects/125209/groups/1705190192091077626): \"Error message from logger\" occurred."
|
2018-11-09 20:33:58 +01:00
|
|
|
self.send_and_test_stream_message('error_message', expected_topic, expected_message)
|