def test_get_odds_trifecta_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_trifecta(d, stadium, race)
def test_get_odds_trifecta_missing_racer(boatrace_tools: PyJPBoatrace): # MISSING RACERS CASE # # preparation d = date(2020, 11, 29) dstr = d.strftime('%Y%m%d') stadium = 10 race = 2 # load true data expected = get_expected_json( f'expected_odds3t.rno={race}&jcd={stadium:02d}&hd={dstr}.json', ) # actual data actual = boatrace_tools.get_odds_trifecta(d, stadium, race) # assertion assert actual == expected
def test_get_odds_trifecta(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_odds3t.rno={race}&jcd={stadium:02d}&hd={dstr}.json', ) # actual data actual = boatrace_tools.get_odds_trifecta(d, stadium, race) # assertion assert actual == expected