Files
zulip/zerver/webhooks/airbrake/tests.py
Prakhar Pratyush 3afc8ed7ae webhooks: Rename *topic local variables to *topic_name.
This is preparatory work towards adding a Topic model.
We plan to use the local variable name as 'topic' for
the Topic model objects.

Currently, we use *topic as the local variable name for
topic names.

We rename local variables of the form *topic to *topic_name
so that we don't need to think about type collisions in
individual code paths where we might want to talk about both
Topic objects and strings for the topic name.
2024-01-17 08:35:29 -08:00

13 lines
586 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_name = "ZulipIntegrationTest"
expected_message = '[ZeroDivisionError](https://zulip.airbrake.io/projects/125209/groups/1705190192091077626): "Error message from logger" occurred.'
self.check_webhook("error_message", expected_topic_name, expected_message)