add _ to googletranslate and googlesearch

This commit is contained in:
fredfishgames 2017-12-11 18:26:31 +00:00 committed by showell
parent 657c6d7b9c
commit 424a4bb631
21 changed files with 19 additions and 19 deletions

View file

@ -43,8 +43,8 @@ force_include = [
"zulip_bots/zulip_bots/bots/giphy/test_giphy.py",
"zulip_bots/zulip_bots/bots/github_detail/github_detail.py",
"zulip_bots/zulip_bots/bots/github_detail/test_github_detail.py",
"zulip_bots/zulip_bots/bots/googlesearch/googlesearch.py",
"zulip_bots/zulip_bots/bots/googlesearch/test_googlesearch.py",
"zulip_bots/zulip_bots/bots/google_search/google_search.py",
"zulip_bots/zulip_bots/bots/google_search/test_google_search.py",
"zulip_bots/zulip_bots/bots/help/help.py",
"zulip_bots/zulip_bots/bots/help/test_help.py",
"zulip_bots/zulip_bots/bots/incrementor/incrementor.py",

View file

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View file

@ -5,7 +5,7 @@ from zulip_bots.test_lib import StubBotTestCase
from unittest.mock import patch
class TestGoogleSearchBot(StubBotTestCase):
bot_name = 'googlesearch'
bot_name = 'google_search'
# Simple query
def test_normal(self) -> None:

View file

@ -2,7 +2,7 @@ from unittest.mock import patch
from requests.exceptions import ConnectionError
from zulip_bots.test_lib import StubBotTestCase
from zulip_bots.bots.googletranslate.googletranslate import TranslateError
from zulip_bots.bots.google_translate.google_translate import TranslateError
help_text = '''
Google translate bot
@ -12,7 +12,7 @@ Visit [here](https://cloud.google.com/translate/docs/languages) for all language
'''
class TestGoogleTranslateBot(StubBotTestCase):
bot_name = "googletranslate"
bot_name = "google_translate"
def _test(self, message, response, http_config_fixture, http_fixture=None):
with self.mock_config_info({'key': 'abcdefg'}), \
@ -62,7 +62,7 @@ class TestGoogleTranslateBot(StubBotTestCase):
'test_languages', 'test_quotation')
def test_exception(self):
with patch('zulip_bots.bots.googletranslate.googletranslate.translate',
with patch('zulip_bots.bots.google_translate.google_translate.translate',
side_effect=Exception):
self._test('"hello" de', 'Error. .', 'test_languages')