writing-bots: Use a fenced code block to fix rendering.

Type annotation for the function is not rendered correctly: `-> None` is
rendered as `-> None`.
This commit is contained in:
Puneeth Chaganti 2019-05-14 22:35:12 +00:00 committed by Tim Abbott
parent dc2aa031f6
commit 64ad031d5c
1 changed files with 13 additions and 10 deletions

View File

@ -388,19 +388,22 @@ refactor them.
https://github.com/zulip/python-zulip-api/tree/master/zulip_bots/zulip_bots/bots/helloworld)
bot.
from zulip_bots.test_lib import StubBotTestCase
```
from zulip_bots.test_lib import StubBotTestCase
class TestHelpBot(StubBotTestCase):
bot_name = "helloworld" # type: str
class TestHelpBot(StubBotTestCase):
bot_name = "helloworld" # type: str
def test_bot(self) -> None:
dialog = [
('', 'beep boop'),
('help', 'beep boop'),
('foo', 'beep boop'),
]
def test_bot(self) -> None:
dialog = [
('', 'beep boop'),
('help', 'beep boop'),
('foo', 'beep boop'),
]
self.verify_dialog(dialog)
self.verify_dialog(dialog)
```
The `helloworld` bot replies with "beep boop" to every message @-mentioning it. We
want our test to verify that the bot **actually** does that.