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