Keep TrueNAS safety assertions independent of Markdown wrapping

PR #2456 run 37175962472 rejected retained safety warnings only because of a line break and sentence capitalization. Normalize prose for these assertions without removing any required warning or diagnostic field.

Contract-Neutral: Documentation test presentation normalization only; no runtime, API or safety-guidance change.
Change-source: pulse-maintainer
This commit is contained in:
pulse-triage[bot]
2026-10-04 06:09:49 +01:00
parent 53cfdf6020
commit c0ceff6697
+4 -1
View File
@@ -91,6 +91,9 @@ class TrueNASDocsTest(unittest.TestCase):
def test_polling_guidance_preserves_evidence_before_a_manual_test(self):
text = DOC.read_text().split("### Stale TrueNAS data", 1)[1].split("### Disabling", 1)[0]
# Markdown wrapping and sentence capitalization do not change the
# safety guidance. Still require every complete warning and field.
prose = " ".join(text.split()).casefold()
for required in (
"Record the existing state before testing or restarting",
"signed-in Pulse admin browser session",
@@ -107,7 +110,7 @@ class TrueNASDocsTest(unittest.TestCase):
"Do not post the full connection response",
):
with self.subTest(required=required):
self.assertIn(required, text)
self.assertIn(" ".join(required.split()).casefold(), prose)
self.assertNotIn("```", text)
self.assertNotIn("Check TrueNAS connectivity and API key validity", text)
# Every suggested field belongs to the existing read-only projection,