def test_list_players(self): """listPlayers() returns 0 if it works.""" dummy_player(player_name="Mark German", country="Germany") self.assertEqual(tournament.listPlayers(), 0)
def test_display_zero_matches(self): """listPlayers() returns 1 if the tournament.Players table is empty""" q = "TRUNCATE TABLE players;" tools.query(q) self.assertEqual(tournament.listPlayers(), 1)