15 lines
492 B
Python
15 lines
492 B
Python
from pathlib import Path
|
|
|
|
from dns_blocklist_mirror.config import load_config
|
|
|
|
REPOSITORY_ROOT = Path(__file__).parents[1]
|
|
|
|
|
|
def test_readme_does_not_duplicate_the_mirror_inventory() -> None:
|
|
config = load_config(REPOSITORY_ROOT / "mirrors.yaml")
|
|
readme = (REPOSITORY_ROOT / "README.md").read_text(encoding="utf-8")
|
|
|
|
for mirror in config.mirrors:
|
|
assert str(mirror.relative_path) not in readme
|
|
for source in mirror.sources:
|
|
assert source not in readme
|