mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	This sets up a new test class with a simple test, mostly for increasing coverage. The class should in the future be extended to properly verify the handle_feedback() logic.
		
			
				
	
	
		
			13 lines
		
	
	
		
			625 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			625 B
		
	
	
	
		
			Python
		
	
	
	
	
	
from unittest.mock import patch, MagicMock
 | 
						|
from django.conf import settings
 | 
						|
from zerver.lib.test_classes import ZulipTestCase
 | 
						|
 | 
						|
class TestFeedbackBot(ZulipTestCase):
 | 
						|
    @patch('logging.info')
 | 
						|
    def test_pm_to_feedback_bot(self, logging_info_mock: MagicMock) -> None:
 | 
						|
        with self.settings(ENABLE_FEEDBACK=True):
 | 
						|
            user_email = self.example_email("othello")
 | 
						|
            self.send_personal_message(user_email, settings.FEEDBACK_BOT,
 | 
						|
                                       content="I am a feedback message.")
 | 
						|
            logging_info_mock.assert_called_once_with("Received feedback from {}".format(user_email))
 |