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")