test(core): keep blank-summary integrity check by bypassing auto-summary save hook
All checks were successful
CI / nightly-e2e (pull_request) Has been skipped
CI / deploy (pull_request) Has been skipped
CI / pr-e2e (pull_request) Successful in 1m29s
CI / ci (pull_request) Successful in 1m40s

This commit is contained in:
codex_a
2026-03-04 22:42:30 +00:00
parent 521075cf04
commit 2c2cb5446f

View File

@@ -25,6 +25,8 @@ def test_check_content_integrity_fails_for_blank_summary(home_page):
)
index.add_child(instance=article)
article.save_revision().publish()
# Simulate legacy/bad data by bypassing model save() auto-summary fallback.
ArticlePage.objects.filter(pk=article.pk).update(summary=" ")
with pytest.raises(CommandError, match="empty summary"):
call_command("check_content_integrity")