Exemplo n.º 1
0
def test_get_odds_trio_cancelled_race(boatrace_tools: PyJPBoatrace):
    # CANCELLED RACERS CASE #
    # preparation
    d = date(2019, 1, 26)
    stadium = 8
    race = 8
    # assert
    with pytest.raises(RaceCancelledException):
        boatrace_tools.get_odds_trio(d, stadium, race)
Exemplo n.º 2
0
def test_get_odds_trio_missing_racer(boatrace_tools: PyJPBoatrace):
    # MISSING RACERS CASE #
    # preparation
    d = date(2020, 11, 29)
    dstr = d.strftime('%Y%m%d')
    stadium = 10
    race = 2
    # expectation
    expected = get_expected_json(
        f'expected_odds3f.rno={race}&jcd={stadium:02d}&hd={dstr}.json', )
    # actual
    actual = boatrace_tools.get_odds_trio(d, stadium, race)
    # assertion
    assert actual == expected
Exemplo n.º 3
0
def test_get_odds_trio(boatrace_tools: PyJPBoatrace):
    # USUAL CASE #
    # preparation
    d = date(2020, 10, 24)
    dstr = d.strftime('%Y%m%d')
    stadium = 14
    race = 1
    # load true data
    expected = get_expected_json(
        f'expected_odds3f.rno={race}&jcd={stadium:02d}&hd={dstr}.json', )
    # actual data
    actual = boatrace_tools.get_odds_trio(d, stadium, race)
    # assertion
    assert actual == expected