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