def test_goal_difference_updates_when_goals_for_change(self): team = Team(self.TEAM_NAME, self.GOALS_FOR, self.GOALS_AGAINST, self.HOME_GAMES, self.AWAY_GAMES, self.POINTS) self.assertEqual(self.GOALS_FOR - self.GOALS_AGAINST, team.goal_difference()) team.goals_for(team.goals_for() + 10) self.assertEqual((self.GOALS_FOR - self.GOALS_AGAINST) + 10, team.goal_difference())
def test_team_initializes_with_expected_values(self): team = Team(self.TEAM_NAME, self.GOALS_FOR, self.GOALS_AGAINST, self.HOME_GAMES, self.AWAY_GAMES, self.POINTS) self.assertEqual(self.TEAM_NAME, team.team_name()) self.assertEqual(self.GOALS_FOR, team.goals_for()) self.assertEqual(self.GOALS_AGAINST, team.goals_against()) self.assertEqual(self.HOME_GAMES, team.home_games()) self.assertEqual(self.AWAY_GAMES, team.away_games()) self.assertEqual(self.POINTS, team.points())