def test_validate_no_announcements(self): player1 = Player("Boyan", "Team1") player2 = Player("Silvia", "Team1") player3 = Player("Freeman", "Team2") player4 = Player("Marto", "Team2") players = [[player1, player2], [player3, player4]] belote = Belote(players) annoucement = {player1: [], player2: [], player3: [], player4: []} expected_result = {player1: [], player2: [], player3: [], player4: []} result = belote.validate_announcements(annoucement)
def test__validate(self): player1 = Player("Boyan", "Team1") player2 = Player("Silvia", "Team1") player3 = Player("Freeman", "Team2") player4 = Player("Marto", "Team2") players = [[player1, player2], [player3, player4]] belote = Belote(players) annoucement = { player1: [('carre', 12), ('carre', 15)], player2: [('carre', 16)], player3: [('tierce', 10)], player4: [('tierce', 11), ('belote', 2)] } expected_result = { player1: [], player2: [('carre', 16)], player3: [], player4: [('tierce', 11), ('belote', 2)] } belote.get_teams_announcements(annoucement) result = belote.validate_announcements(annoucement) self.assertEqual(result, expected_result)