Home intro from retoor as editable site_intro setting; fix settings upsert

This commit is contained in:
2026-10-05 11:12:18 +02:00
parent 3fb47bf401
commit bbdecdc95b
14 changed files with 131 additions and 16 deletions
+10
View File
@@ -6,3 +6,13 @@ def test_soft_delete_tables_partition():
tables = set(SOFT_DELETE_TABLES)
assert tables == set(REPORTABLE_TARGETS) | set(UNREPORTABLE_TABLES)
assert not set(REPORTABLE_TARGETS) & set(UNREPORTABLE_TABLES)
def test_intro_seed_is_clean():
from molodetz.constants import SETTINGS_DEFAULTS, SITE_INTRO_SEED
assert SETTINGS_DEFAULTS["site_intro"] == SITE_INTRO_SEED
assert SITE_INTRO_SEED.startswith("I wrote more code than you.")
assert "retoor@molodetz.nl" not in SITE_INTRO_SEED
assert "I wrote more code than you. I wrote more code than the best programmer you know. I wrote more code than you two together. To top it off" in SITE_INTRO_SEED
assert chr(0x2014) not in SITE_INTRO_SEED and chr(0x2013) not in SITE_INTRO_SEED