Files
ad/tests/unit/constants.py
T

19 lines
883 B
Python

# retoor <retoor@molodetz.nl>
from molodetz.constants import REPORTABLE_TARGETS, SOFT_DELETE_TABLES, UNREPORTABLE_TABLES
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