def test_get_odds_exacta_quinella_cancelled_race(boatrace_tools: PyJPBoatrace): # CANCELLED RACE CASE # # preparation d = date(2019, 1, 26) stadium = 8 race = 8 # assert with pytest.raises(RaceCancelledException): boatrace_tools.get_odds_exacta_quinella(d, stadium, race)
def test_get_odds_exacta_quinella_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_odds2tf.rno={race}&jcd={stadium:02d}&hd={dstr}.json', ) # actual data actual = boatrace_tools.get_odds_exacta_quinella(d, stadium, race) # assertion assert actual == expected
def test_get_odds_exacta_quinella(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_odds2tf.rno={race}&jcd={stadium:02d}&hd={dstr}.json', ) # actual data actual = boatrace_tools.get_odds_exacta_quinella(d, stadium, race) # assertion assert actual == expected