def test_get_show_ia_url(): rs = get_refined_index_by_id("hooting_yard_2007-05-02") assert rs.get_archive_org_url( ) == "https://archive.org/details/hy0_hooting_yard_2007-05-02"
def test_get_tx_date(): rs = get_refined_index_by_id("hooting_yard_2007-05-02") assert rs.tx_date() == datetime.date(2007, 5, 2)
def test_get_show_title(): rs = get_refined_index_by_id("hooting_yard_2007-05-02") assert rs.title() == "Rose Garden"
def test_get_most_significant_story(): rs = get_refined_index_by_id("hooting_yard_2007-05-02") assert rs.get_most_significant_story().story.id == "2006-09-02-rose-garden"
def test_get_longest_story(): rs = get_refined_index_by_id("hooting_yard_2007-05-02") longest_story: StoryInfo = rs.get_stories_in_order_of_length()[0] assert longest_story.story.id == "2013-12-17-tenth-anniversary-iv"
def test_get_show_length(): rs = get_refined_index_by_id("hooting_yard_2007-05-09") toc = rs.get_toc() print("")
def test_get_show_length(): rs = get_refined_index_by_id("hooting_yard_2007-05-09") assert rs.get_duration() == 1803
def has_refined_index(id: str) -> bool: try: get_refined_index_by_id(id) except FileNotFoundError: return False return True