mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	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.
		
			
				
	
	
		
			13 lines
		
	
	
		
			602 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			602 B
		
	
	
	
		
			Python
		
	
	
	
	
	
from zerver.lib.test_classes import WebhookTestCase
 | 
						|
 | 
						|
 | 
						|
class ErrBitHookTests(WebhookTestCase):
 | 
						|
    STREAM_NAME = "errbit"
 | 
						|
    URL_TEMPLATE = "/api/v1/external/errbit?stream={stream}&api_key={api_key}"
 | 
						|
    WEBHOOK_DIR_NAME = "errbit"
 | 
						|
 | 
						|
    def test_errbit_error_message(self) -> None:
 | 
						|
        expected_topic = "ZulipIntegrationTest / ErrbitEnvName"
 | 
						|
        expected_message = '[IllegalStateException](https://errbit.example.com/apps/5e1ed1ff1a603f3916f4f0de/problems/5e1fe93e1a603f3916f4f0e3): "Invalid state error" occurred.'
 | 
						|
        self.check_webhook("error_message", expected_topic, expected_message)
 |