def test_game_get_team_what_in_fail(): game = Game() with pytest.raises(TeamKeyError) as excinfo: game.get_team("cow") assert "Only 'home' or 'away' key is permitted" in str(excinfo.value)
def test_game_get_team_in_case_away(): game = Game() assert game.get_team("away") is game.away_team
def test_game_get_team_in_case_home(): game = Game() assert game.get_team("home") is game.home_team