Пример #1
0
def test_selected_categories_wblist_long(mock_get_compatible_sets):
    """Mixing white/black list results in the differentiated set if blist is longer."""
    wl = ["a", "b"]
    bl = ["a", "d", "e"]
    result = cli.selected_categories(wl, bl)
    assert result == ["b"]
Пример #2
0
def test_selected_categories_blist(mock_get_compatible_sets):
    """Blacklisted categories are the inverse selection."""
    bl = ["a", "b", "c"]
    result = cli.selected_categories([], bl)
    assert sorted(result) == sorted(["d", "e"])
Пример #3
0
def test_selected_categories_wlist(mock_get_compatible_sets):
    """Whitelisted categories are only selections."""
    wl = ["a", "b"]
    result = cli.selected_categories(wl, [])
    assert sorted(result) == sorted(wl)
Пример #4
0
def test_selected_categories_empty_lists(mock_get_compatible_sets):
    """Empty lists should be the full set."""
    result = cli.selected_categories([], [])
    assert sorted(result) == sorted(EXPECTED_CATEGORIES)
Пример #5
0
def test_selected_categories_wblist(mock_get_compatible_sets):
    """Mixing white/black list results in the differentiated set."""
    wl = ["a", "b"]
    bl = ["a"]
    result = selected_categories(wl, bl)
    assert result == {"b"}
Пример #6
0
def test_selected_categories_blist(mock_get_compatible_sets):
    """Blacklisted categories are the inverse selection."""
    bl = ["a", "b", "c"]
    result = selected_categories([], bl)
    assert result == {"d", "e"}