def testparseGameResultAwayTeamNameWithSpace(self): game_result = GameResult('TeamA 0, Team B 2') game_result.parseGameResult() self.assertEqual(game_result._home_team_score, 0) self.assertEqual(game_result._away_team_score, 2) self.assertEqual(game_result.home_team, 'TeamA') self.assertEqual(game_result.away_team, 'Team B')
def testparseGameResultBigScore(self): game_result = GameResult('TeamA 11, TeamB 2') game_result.parseGameResult() self.assertEqual(game_result._home_team_score, 11) self.assertEqual(game_result._away_team_score, 2) self.assertEqual(game_result.home_team, 'TeamA') self.assertEqual(game_result.away_team, 'TeamB')
def testparseGameResultHomeTeamNameWithSpace(self): game_result = GameResult('TeamWithVeryLongName Space 1, TeamB 2') game_result.parseGameResult() self.assertEqual(game_result._home_team_score, 1) self.assertEqual(game_result._away_team_score, 2) self.assertEqual(game_result.home_team, 'TeamWithVeryLongName Space') self.assertEqual(game_result.away_team, 'TeamB')