def test_get_table(self): test_rounds = TournamentSystemOlympic(PLAYERS_LIST) test_rounds.get_current_round_results = Mock() test_rounds._data = DATA table = test_rounds.get_table() for line in table: print(line)
def test_get_rounds(self): test_rounds = TournamentSystemOlympic(PLAYERS_LIST) test_rounds.get_current_round_results = Mock() test_rounds.get_current_round_results.side_effect = [FIRST, SECOND, THIRD] list_of_rounds = list(test_rounds.get_rounds()) first_players = list(list_of_rounds[0]) second_players = list(list_of_rounds[1]) third_players = list(list_of_rounds[2]) self.assertEqual(first_players, FIRST_ROUND) self.assertEqual(second_players, SECOND_ROUND) self.assertEqual(third_players, THIRD_ROUND)