definition bot: Clarify error message.
This commit is contained in:
parent
5671dba71e
commit
6c47eda92b
|
@ -11,7 +11,7 @@ class DefineHandler(object):
|
||||||
'''
|
'''
|
||||||
|
|
||||||
DEFINITION_API_URL = 'https://owlbot.info/api/v1/dictionary/{}?format=json'
|
DEFINITION_API_URL = 'https://owlbot.info/api/v1/dictionary/{}?format=json'
|
||||||
REQUEST_ERROR_MESSAGE = 'Definition not available.'
|
REQUEST_ERROR_MESSAGE = 'Could not load definition.'
|
||||||
EMPTY_WORD_REQUEST_ERROR_MESSAGE = 'Please enter a word to define.'
|
EMPTY_WORD_REQUEST_ERROR_MESSAGE = 'Please enter a word to define.'
|
||||||
PHRASE_ERROR_MESSAGE = 'Definitions for phrases are not available.'
|
PHRASE_ERROR_MESSAGE = 'Definitions for phrases are not available.'
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ class TestDefineBot(BotTestCase):
|
||||||
)
|
)
|
||||||
|
|
||||||
# Incorrect word.
|
# Incorrect word.
|
||||||
bot_response = "**foo**:\nDefinition not available."
|
bot_response = "**foo**:\nCould not load definition."
|
||||||
with self.mock_http_conversation('test_incorrect_word'):
|
with self.mock_http_conversation('test_incorrect_word'):
|
||||||
self.assert_bot_response(
|
self.assert_bot_response(
|
||||||
message = {'content': 'foo'},
|
message = {'content': 'foo'},
|
||||||
|
|
Loading…
Reference in a new issue