mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
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.
20 lines
836 B
Python
20 lines
836 B
Python
from zerver.lib.test_classes import WebhookTestCase
|
|
|
|
|
|
class CrashlyticsHookTests(WebhookTestCase):
|
|
STREAM_NAME = "crashlytics"
|
|
URL_TEMPLATE = "/api/v1/external/crashlytics?stream={stream}&api_key={api_key}"
|
|
WEBHOOK_DIR_NAME = "crashlytics"
|
|
|
|
def test_crashlytics_verification_message(self) -> None:
|
|
expected_topic_name = "Setup"
|
|
expected_message = "Webhook has been successfully configured."
|
|
self.check_webhook("verification", expected_topic_name, expected_message)
|
|
|
|
def test_crashlytics_build_in_success_status(self) -> None:
|
|
expected_topic_name = "123: Issue Title"
|
|
expected_message = (
|
|
"[Issue](http://crashlytics.com/full/url/to/issue) impacts at least 16 device(s)."
|
|
)
|
|
self.check_webhook("issue_message", expected_topic_name, expected_message)
|