zulip_bots: Make state_handler property of bot_handler.

This commit is contained in:
derAnfaenger 2017-10-23 12:17:46 +02:00
parent 45c38d0dcf
commit eb6982e670
25 changed files with 51 additions and 51 deletions

View file

@ -104,7 +104,9 @@ class BotTestCase(TestCase):
if state_handler is None:
state_handler = StateHandler()
# Send message to the concerned bot
self.message_handler.handle_message(message, self.MockClass(None, None), state_handler)
mock_bot_handler = self.MockClass(None, None)
mock_bot_handler.state_handler = state_handler
self.message_handler.handle_message(message, mock_bot_handler)
# Check if the bot is sending a message via `send_message` function.
# Where response is a dictionary here.