Exemplo n.º 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"]
Exemplo n.º 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"])
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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"}
Exemplo n.º 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"}