From 2c2cb5446f6a97d5ce992e59da2fed5475e15bc5 Mon Sep 17 00:00:00 2001 From: codex_a Date: Wed, 4 Mar 2026 22:42:30 +0000 Subject: [PATCH] test(core): keep blank-summary integrity check by bypassing auto-summary save hook --- apps/core/tests/test_commands.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/core/tests/test_commands.py b/apps/core/tests/test_commands.py index 381064c..80f6fd8 100644 --- a/apps/core/tests/test_commands.py +++ b/apps/core/tests/test_commands.py @@ -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")