def __init__(self) -> None: self.storage = SimpleStorage() self.full_name = "test-bot" self.email = "*****@*****.**" self.user_id = 0 self.message_server = MockMessageServer() self.reset_transcript()
def __init__(self): # type: () -> None self.storage = SimpleStorage() self.full_name = 'test-bot' self.email = '*****@*****.**' self.message_server = SimpleMessageServer() self.reset_transcript()
def test_new_game_phase(self): storage = SimpleStorage() merels = database.MerelsStorage(storage) merels.create_new_game("test") res = game_data.GameData(merels.get_game_data("test")) self.assertEqual(res.get_phase(), 1) merels.update_game(res.topic_name, "O", 5, 4, "XXXXNNNOOOOONNNNNNNNNNNN", "03", 0) res = game_data.GameData(merels.get_game_data("test")) self.assertEqual(res.board, "XXXXNNNOOOOONNNNNNNNNNNN") self.assertEqual(res.get_phase(), 2) merels.update_game(res.topic_name, "X", 6, 4, "XXXNNNNOOOOONNNNNNNNNNNN", "03", 0) res = game_data.GameData(merels.get_game_data("test")) self.assertEqual(res.board, "XXXNNNNOOOOONNNNNNNNNNNN") self.assertEqual(res.get_phase(), 3)
def setUp(self): self.storage = SimpleStorage() self.merels = database.MerelsStorage("", self.storage)
def setUp(self): self.storage = SimpleStorage() self.topic_name = "test"
def __init__(self): # type: () -> None self.storage = SimpleStorage() self.message_server = SimpleMessageServer() self.reset_transcript()