mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			20 lines
		
	
	
		
			896 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			896 B
		
	
	
	
		
			Python
		
	
	
	
	
	
# -*- coding: utf-8 -*-
 | 
						|
from zerver.lib.test_classes import WebhookTestCase
 | 
						|
 | 
						|
class CrashlyticsHookTests(WebhookTestCase):
 | 
						|
    STREAM_NAME = 'crashlytics'
 | 
						|
    URL_TEMPLATE = u"/api/v1/external/crashlytics?stream={stream}&api_key={api_key}"
 | 
						|
    FIXTURE_DIR_NAME = 'crashlytics'
 | 
						|
 | 
						|
    def test_crashlytics_verification_message(self):
 | 
						|
        # type: () -> None
 | 
						|
        expected_subject = u"Setup"
 | 
						|
        expected_message = u"Webhook has been successfully configured."
 | 
						|
        self.send_and_test_stream_message('verification', expected_subject, expected_message)
 | 
						|
 | 
						|
    def test_crashlytics_build_in_success_status(self):
 | 
						|
        # type: () -> None
 | 
						|
        expected_subject = u"123: Issue Title"
 | 
						|
        expected_message = u"[Issue](http://crashlytics.com/full/url/to/issue) impacts at least 16 device(s)."
 | 
						|
        self.send_and_test_stream_message('issue_message', expected_subject, expected_message)
 |