def test_increment_page_number_good_format(page_good_format): chapter = page_good_format["chapter"] page = page_good_format["page"] current_page = utils.build_img_path(chapter, page) next_page = utils.increment_page_number(current_page) expected_output = '/manga_ch1/x_v001-010' assert next_page == expected_output
def test_build_img_path_none_values(): chapter = None page = None expected_output = '/None/None' assert utils.build_img_path(chapter, page) == expected_output
def test_increment_page_number_bad_format(page_bad_format): with pytest.raises(ValueError): current_page = utils.build_img_path(page_bad_format["chapter"], page_bad_format["page"]) utils.increment_page_number(current_page)
def test_build_img_path(page_good_format): chapter = page_good_format["chapter"] page = page_good_format["page"] expected_output = '/manga_ch1/x_v001-009' assert utils.build_img_path(chapter,page) == expected_output