Files
zulip/zerver/webhooks/airbrake/tests.py
PIG208 5ecbfecd77 webhook: Rename FIXTURE_DIR_NAME to WEBHOOK_DIR_NAME.
Since FIXTURE_DIR_NAME is the name of the folder that contains the view
and tests modules of the webhook and another folder called "fixtures" that
store the fixtures, it is more appropriate to call it WEBHOOK_DIR_NAME,
especially when we want to refer to the view module using this variable.
2021-06-29 17:01:54 -07:00

13 lines
576 B
Python

from zerver.lib.test_classes import WebhookTestCase
class AirbrakeHookTests(WebhookTestCase):
STREAM_NAME = "airbrake"
URL_TEMPLATE = "/api/v1/external/airbrake?stream={stream}&api_key={api_key}"
WEBHOOK_DIR_NAME = "airbrake"
def test_airbrake_error_message(self) -> None:
expected_topic = "ZulipIntegrationTest"
expected_message = '[ZeroDivisionError](https://zulip.airbrake.io/projects/125209/groups/1705190192091077626): "Error message from logger" occurred.'
self.check_webhook("error_message", expected_topic, expected_message)