Esempio n. 1
0
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)
Esempio n. 2
0
def test_game_get_team_in_case_away():
    game = Game()
    assert game.get_team("away") is game.away_team
Esempio n. 3
0
def test_game_get_team_in_case_home():
    game = Game()
    assert game.get_team("home") is game.home_team
Esempio n. 4
0
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)
Esempio n. 5
0
def test_game_get_team_in_case_away():
    game = Game()
    assert game.get_team("away") is game.away_team
Esempio n. 6
0
def test_game_get_team_in_case_home():
    game = Game()
    assert game.get_team("home") is game.home_team