bot tests: Use StubBotTestCase for help bot.
This commit is contained in:
		
							parent
							
								
									6087cf95e2
								
							
						
					
					
						commit
						4ede1a5564
					
				
					 1 changed files with 11 additions and 10 deletions
				
			
		|  | @ -1,16 +1,17 @@ | ||||||
| #!/usr/bin/env python | #!/usr/bin/env python | ||||||
| 
 | 
 | ||||||
| from __future__ import absolute_import | from zulip_bots.test_lib import StubBotTestCase | ||||||
| from __future__ import print_function |  | ||||||
| 
 | 
 | ||||||
| from six.moves import zip | class TestHelpBot(StubBotTestCase): | ||||||
| 
 |  | ||||||
| from zulip_bots.test_lib import BotTestCase |  | ||||||
| 
 |  | ||||||
| class TestHelpBot(BotTestCase): |  | ||||||
|     bot_name = "help" |     bot_name = "help" | ||||||
| 
 | 
 | ||||||
|     def test_bot(self): |     def test_bot(self): | ||||||
|         txt = "Info on Zulip can be found here:\nhttps://github.com/zulip/zulip" |         help_text = "Info on Zulip can be found here:\nhttps://github.com/zulip/zulip" | ||||||
|         messages = ["", "help", "Hi, my name is abc"] |         requests = ["", "help", "Hi, my name is abc"] | ||||||
|         self.check_expected_responses(list(zip(messages, len(messages)*[txt]))) | 
 | ||||||
|  |         dialog = [ | ||||||
|  |             (request, help_text) | ||||||
|  |             for request in requests | ||||||
|  |         ] | ||||||
|  | 
 | ||||||
|  |         self.verify_dialog(dialog) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Steve Howell
						Steve Howell