def test_load_and_blacklist_new_stage(): checklist = dm.checklist.load(StringIO( """ blacklist: stage: series1: """)) checklist.blacklist("stage", "series2") assert checklist.is_blacklisted("stage", "series1"), checklist assert checklist.is_blacklisted("stage", "series2"), checklist
def test_load_format_error_empty_blacklist_stage(): checklist = dm.checklist.load(StringIO( """ blacklist: stage: """)) assert not checklist.is_blacklisted("stage", "series"), checklist
def test_save_load_checklist(): checklist = dm.checklist.load(StringIO()) checklist.blacklist("stage", "series") stream = StringIO() checklist.save(stream) stream.seek(0) checklist = dm.checklist.load(stream) assert checklist.is_blacklisted("stage", "series"), checklist
def test_remove_from_empty_blacklist(): checklist = dm.checklist.load(StringIO()) checklist.unblacklist("stage", "series") assert not checklist.is_blacklisted("stage", "series")
def test_empty_checklist_blacklist_add_new_stage(): checklist = dm.checklist.load(StringIO()) checklist.blacklist("stage", "series") assert checklist.is_blacklisted("stage", "series")
def test_empty_checklist_is_blacklisted(): checklist = dm.checklist.load(StringIO()) assert not checklist.is_blacklisted("stage", "series")