wikipedia bot: Update bot & tests to use bot identity functionality.
MODIFY
zulip_bots/zulip_bots/bots/wikipedia/test_wikipedia.py
zulip_bots/zulip_bots/bots/wikipedia/test_wikipedia.py
@@ -52,7 +52,7 @@ class TestWikipediaBot(BotTestCase):
# Empty query, no request made to the Internet.
bot_request = ''
- bot_response = "Please enter your search term after @mention-bot"
+ bot_response = "Please enter your search term after @**test-bot**"
self.verify_reply(bot_request, bot_response)
# Incorrect status code

MODIFY
zulip_bots/zulip_bots/bots/wikipedia/wikipedia.py
zulip_bots/zulip_bots/bots/wikipedia/wikipedia.py
@@ -40,12 +40,12 @@ class WikipediaHandler(object):
def get_bot_wiki_response(self, message: Dict[str, str], bot_handler: Any) -> Optional[str]:
'''This function returns the URLs of the requested topic.'''
- help_text = 'Please enter your search term after @mention-bot'
+ help_text = 'Please enter your search term after {}'
# Checking if the link exists.
query = message['content']
if query == '':
- return help_text
+ return help_text.format(bot_handler.identity().mention)
query_wiki_url = 'https://en.wikipedia.org/w/api.php'
query_wiki_params = dict(

wikipedia bot: Update bot & tests to use bot identity functionality.