From 588a08773b864720a9c7d2d2a0254fa34a36d35e Mon Sep 17 00:00:00 2001 From: autonomic-bot Date: Sun, 31 May 2026 04:46:48 +0000 Subject: [PATCH] fix(discourse): send capitalised topic title so Discourse title_prettify is a no-op (was 'ccci'->'Ccci' mismatch) --- tests/discourse/functional/test_create_topic.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/discourse/functional/test_create_topic.py b/tests/discourse/functional/test_create_topic.py index abf7212..fbadcef 100644 --- a/tests/discourse/functional/test_create_topic.py +++ b/tests/discourse/functional/test_create_topic.py @@ -36,8 +36,11 @@ def test_create_topic_roundtrip(live_app): hdrs = _discourse.admin_headers(api_key, api_user) # 3) Create a topic with a unique marker in title + body (raw must be >= ~20 chars). + # Discourse's `title_prettify` (on by default) capitalises the title's first letter, so we send a + # title that already starts capitalised — that normalisation is then a no-op and the exact-equality + # round-trip below stays faithful (the unique hex token is mid-string, untouched either way). uniq = uuid.uuid4().hex[:10] - title = f"ccci topic {uniq}" + title = f"CCCI topic {uniq}" marker = f"ccci-body-marker-{uniq}-roundtrip-padding-text" status, body = harness_http.http_post( f"{base}/posts.json",