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