"""The compose file the README shows is the one users deploy from. The README carries docker-compose.yml inline, so a newcomer can copy it from the page. Both copies have to say the same thing. """ from pathlib import Path ROOT = Path(__file__).resolve().parent.parent def test_the_readme_shows_the_shipped_compose_file_verbatim(): compose = (ROOT / "docker-compose.yml").read_text() readme = (ROOT / "README.md").read_text() assert f"```yaml\n{compose}```" in readme def test_the_shipped_compose_needs_no_key_and_keeps_its_data(): compose = (ROOT / "docker-compose.yml").read_text() settings = [line for line in compose.splitlines() if not line.lstrip().startswith("#")] assert not [line for line in settings if "SECRET_KEY" in line] assert "app_data:/data" in compose assert "pgdata:/var/lib/postgresql/data" in compose