def test_load(self): sheets = SeasonStatsheet.load(["64392ad5-e14c-42c0-825c-c85da29addaa"]) assert isinstance(sheets, dict) assert len(sheets) == 1 for key, sheet in sheets.items(): assert isinstance(key, str) assert isinstance(sheet, SeasonStatsheet) assert key == sheet.id
def season_statsheet_s11(self): id_ = "fe1d4070-efbf-4c7e-973d-06e9226fd4de" return SeasonStatsheet.load(id_).get(id_)
def season_statsheet_s1(self): id_ = "8b0bb83b-ae1b-4b80-85a7-96eefc2d45cb" return SeasonStatsheet.load(id_).get(id_)
def test_load_by_season_bad_season_high(self): with pytest.raises(ValueError): bad_season = SeasonStatsheet.load_by_season(999)
def test_load_by_season(self): sheet = SeasonStatsheet.load_by_season(4) assert isinstance(sheet, SeasonStatsheet)
def test_load_bad_id(self): bad_id = SeasonStatsheet.load("00000000-0000-0000-0000-000000000000") assert isinstance(bad_id, dict) assert len(bad_id) == 0