20 lines
747 B
Python
20 lines
747 B
Python
"""Catalogue noise filtering for client-facing worksheets."""
|
|
|
|
from applepy.catalog_policy import loobins_entry_is_report_noise
|
|
|
|
|
|
def test_loobins_noise_dock_and_finder(monkeypatch) -> None:
|
|
monkeypatch.delenv("APPLEPY_CATALOG_INCLUDE_NOISE", raising=False)
|
|
assert loobins_entry_is_report_noise("Dock") is True
|
|
assert loobins_entry_is_report_noise("Finder") is True
|
|
|
|
|
|
def test_loobins_noise_overridden_by_env(monkeypatch) -> None:
|
|
monkeypatch.setenv("APPLEPY_CATALOG_INCLUDE_NOISE", "1")
|
|
assert loobins_entry_is_report_noise("Dock") is False
|
|
|
|
|
|
def test_loobins_non_noise_tool(monkeypatch) -> None:
|
|
monkeypatch.delenv("APPLEPY_CATALOG_INCLUDE_NOISE", raising=False)
|
|
assert loobins_entry_is_report_noise("curl") is False
|