bots: Test get_config_info with giphy bot.
This involves both using the new `initialize` method for calling `get_config_info`, and refactoring the testing framework by adding a way for mocking this method.
This commit is contained in:
parent
f4369fe013
commit
84c1827291
3 changed files with 23 additions and 12 deletions
|
@ -22,7 +22,9 @@ class TestGiphyBot(BotTestCase):
|
|||
'(https://media4.giphy.com/media/3o6ZtpxSZbQRRnwCKQ/giphy.gif)' \
|
||||
'[](/static/images/interactive-bot/giphy/powered-by-giphy.png)'
|
||||
# This message calls the `send_reply` function of BotHandlerApi
|
||||
with self.mock_http_conversation('test_1'):
|
||||
with self.mock_config_info({'key': '12345678'}), \
|
||||
self.mock_http_conversation('test_1'):
|
||||
self.initialize_bot()
|
||||
self.assert_bot_response(
|
||||
message = {'content': 'Hello'},
|
||||
response = {'content': bot_response},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue