github_detail_bot: Add tests for bad requests.
(This module now has 100% coverage.)
This commit is contained in:
		
							parent
							
								
									8e978a0845
								
							
						
					
					
						commit
						68fcb3c8e1
					
				
					 1 changed files with 7 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -67,6 +67,13 @@ class TestGithubDetailBot(BotTestCase):
 | 
			
		|||
            with self.mock_config_info(self.mock_config):
 | 
			
		||||
                self.verify_reply(request, bot_response)
 | 
			
		||||
 | 
			
		||||
    def test_exception(self) -> None:
 | 
			
		||||
        request = 'zulip/zulip#0'
 | 
			
		||||
        bot_response = 'Failed to find issue/pr: zulip/zulip#0'
 | 
			
		||||
        with self.mock_request_exception():
 | 
			
		||||
            with self.mock_config_info(self.mock_config):
 | 
			
		||||
                self.verify_reply(request, bot_response)
 | 
			
		||||
 | 
			
		||||
    def test_random_text(self) -> None:
 | 
			
		||||
        request = 'some random text'
 | 
			
		||||
        bot_response = 'Failed to find any issue or PR.'
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue