def test_set_any_user_validator(self): channel_id = "test_set_validotr" shogi = ShogiInput.init(channel_id, [{ "id": "user1", "name": "user1name", }, { "id": "user2", "name": "user2name", }]) ShogiInput.move("76歩", channel_id, shogi.first_user.id) with self.assertRaises(UserDifferentException): ShogiInput.move("34歩", channel_id, shogi.first_user.id) ShogiInput.setAllMode(channel_id) ShogiInput.move("34歩", channel_id, shogi.first_user.id)
def set_mode(channel, message, arg): if arg == "all": ShogiInput.setAllMode(channel.channel_id) message.reply("Done! All member can move now!")