def test_calc_standings(self): home = Team(u'TOP Oss') away = Team(u'Go Ahead Eagles') m = Match(home, 0, away, 3) l = League(u'Eerste Divisie') match_outcome = l.__calc_league_stats__(m) self.assertEqual(match_outcome, [{ u'goals_for': 0, u'won': 0, u'goals_against': 3, u'lost': 1, u'team': home, u'played': 1, u'drew': 0, u'points': 0 }, { u'goals_for': 3, u'won': 1, u'goals_against': 0, u'lost': 0, u'team': away, u'played': 1, u'drew': 0, u'points': 3 }])
def test_calc_standings(self): home = Team(u'TOP Oss') away = Team(u'Go Ahead Eagles') m = Match(home, 0, away, 3) l = League(u'Eerste Divisie') match_outcome = l.__calc_league_stats__(m) self.assertEqual( match_outcome, [ {u'goals_for': 0, u'won': 0, u'goals_against': 3, u'lost': 1, u'team': home, u'played': 1, u'drew': 0, u'points': 0}, {u'goals_for': 3, u'won': 1, u'goals_against': 0, u'lost': 0, u'team': away, u'played': 1, u'drew': 0, u'points': 3} ])