Link node keeps names as written; compares them normalised

This commit is contained in:
Roberto Treviño
2026-11-25 17:39:32 -06:00
parent 8c0ec5106c
commit d3d9cc3950
2 changed files with 17 additions and 5 deletions
+8
View File
@@ -47,6 +47,14 @@ def test_a_messy_site_becomes_silver_and_review_gets_the_rest(platform, messy_si
assert torn and torn == held, (torn, held)
patient = {p: next(iter(who)) for p, who in members.items() if p not in torn}
# A name reaches silver as the registry wrote it (accents, ñ); linking compared it
# without them, so the reports' plain upper-case names still joined.
torn_patients = {x for p in torn for x in members[p]}
written = {r["values"]["full_name"] for r in truth
if r["entity"] == "identity" and r["person"] not in torn_patients} # fmt: skip
names = {text for (text,) in q("select text from silver.person_name")}
assert any("ñ" in n for n in written) and written <= names
# Every patient split into several persons is in the review queue, joined by candidates.
parts: dict[str, set] = {}
for p, x in patient.items():