def test_filter_resources_02(teflo1, asset2, asset3): """ this test verifies resources which match the skip_labels are skipped""" res_list = [asset2, asset3] teflo1.teflo_options.update(labels=tuple(), skip_labels=('label2', )) res = filter_resources_labels(res_list, teflo1.teflo_options) assert res[0] == asset3
def test_filter_resources_03(asset2, asset3): """ this test verifies resource list is sent back when no labels or skip_labels are matched""" res_list = [asset2, asset3] res = filter_resources_labels(res_list, {}) assert asset2 in res assert asset3 in res
def test_filter_resources_01(teflo1, asset2, asset3): """ this test verifies only resources which match the labels provided are picked""" res_list = [asset2, asset3] res = filter_resources_labels(res_list, teflo1.teflo_options) assert res[0] == asset2