github_detail_bot: Add tests for bad requests.
(This module now has 100% coverage.)
This commit is contained in:
parent
8e978a0845
commit
68fcb3c8e1
|
@ -67,6 +67,13 @@ class TestGithubDetailBot(BotTestCase):
|
||||||
with self.mock_config_info(self.mock_config):
|
with self.mock_config_info(self.mock_config):
|
||||||
self.verify_reply(request, bot_response)
|
self.verify_reply(request, bot_response)
|
||||||
|
|
||||||
|
def test_exception(self) -> None:
|
||||||
|
request = 'zulip/zulip#0'
|
||||||
|
bot_response = 'Failed to find issue/pr: zulip/zulip#0'
|
||||||
|
with self.mock_request_exception():
|
||||||
|
with self.mock_config_info(self.mock_config):
|
||||||
|
self.verify_reply(request, bot_response)
|
||||||
|
|
||||||
def test_random_text(self) -> None:
|
def test_random_text(self) -> None:
|
||||||
request = 'some random text'
|
request = 'some random text'
|
||||||
bot_response = 'Failed to find any issue or PR.'
|
bot_response = 'Failed to find any issue or PR.'
|
||||||
|
|
Loading…
Reference in a new issue