2020-01-16 08:01:39 +01:00
from zerver . lib . test_classes import WebhookTestCase
class ErrBitHookTests ( WebhookTestCase ) :
2024-05-04 22:02:50 +02:00
CHANNEL_NAME = " errbit "
2020-04-09 21:51:58 +02:00
URL_TEMPLATE = " /api/v1/external/errbit?stream= {stream} &api_key= {api_key} "
2021-06-26 09:18:33 +02:00
WEBHOOK_DIR_NAME = " errbit "
2020-01-16 08:01:39 +01:00
def test_errbit_error_message ( self ) - > None :
2024-01-17 15:53:30 +01:00
expected_topic_name = " ZulipIntegrationTest / ErrbitEnvName "
2021-02-12 08:20:45 +01:00
expected_message = ' [IllegalStateException](https://errbit.example.com/apps/5e1ed1ff1a603f3916f4f0de/problems/5e1fe93e1a603f3916f4f0e3): " Invalid state error " occurred. '
2024-01-17 15:53:30 +01:00
self . check_webhook ( " error_message " , expected_topic_name , expected_message )