game_handler: Support single player games and enforce 'rules' command.

Update tests for test_connect_four.py and test_game_handler_bot.py.
This commit is contained in:
Tarun Kumar 2018-03-03 02:53:03 +05:30 committed by showell
parent 0f45f28696
commit ee611d935e
3 changed files with 104 additions and 20 deletions

View file

@ -66,6 +66,8 @@ class TestConnectFourBot(BotTestCase):
`leaderboard`
* To withdraw an invitation, type
`cancel game`
* To see rules of this game, type
`rules`
* To make your move during a game, type
```move <column-number>``` or ```<column-number>```'''

View file

@ -123,6 +123,8 @@ class TestGameHandlerBot(BotTestCase):
`leaderboard`
* To withdraw an invitation, type
`cancel game`
* To see rules of this game, type
`rules`
* To make your move during a game, type
```move <column-number>```'''
@ -379,7 +381,7 @@ class TestGameHandlerBot(BotTestCase):
def test_invalid_move_message(self) -> None:
bot = self.setup_game()
self.verify_response('move 9', 'Invalid Move.', 0,
bot=bot, stream='test', subject='test game', max_messages=1)
bot=bot, stream='test', subject='test game', max_messages=2)
def test_get_game_id_by_email(self) -> None:
bot = self.setup_game()