Mark legacy moderation system tests for removal

pull/10968/head
Sage Abdullah 2023-10-02 13:08:22 +01:00
rodzic bb5d45a0c4
commit e57a57dbaa
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: EB1A33CC51CC0217
5 zmienionych plików z 34 dodań i 0 usunięć

Wyświetl plik

@ -2528,6 +2528,10 @@ class TestIssue3982(WagtailTestUtils, TestCase):
)
)
# RemovedInWagtail60Warning
# Remove the following tests when the deprecation period for the legacy
# moderation system ends.
def _approve_page(self, parent):
self.client.post(
reverse("wagtailadmin_pages:add", args=("tests", "simplepage", parent.pk)),

Wyświetl plik

@ -18,6 +18,10 @@ from wagtail.utils.deprecation import RemovedInWagtail60Warning
class TestApproveRejectModeration(WagtailTestUtils, TestCase):
# RemovedInWagtail60Warning
# Remove this test class when the deprecation period for the legacy
# moderation system ends.
def setUp(self):
self.submitter = self.create_superuser(
username="submitter",
@ -229,6 +233,11 @@ class TestApproveRejectModeration(WagtailTestUtils, TestCase):
class TestNotificationPreferences(WagtailTestUtils, TestCase):
# RemovedInWagtail60Warning
# Remove this test class when the deprecation period for the legacy
# moderation system ends. This test has been replaced by
# wagtail.admin.tests.test_workflows.TestPageNotificationPreferences.
def setUp(self):
# Find root page
self.root_page = Page.objects.get(id=2)
@ -431,6 +440,12 @@ class TestNotificationPreferences(WagtailTestUtils, TestCase):
class TestApproveRejectModerationWithoutUser(WagtailTestUtils, TestCase):
# RemovedInWagtail60Warning
# Remove this test class when the deprecation period for the legacy
# moderation system ends.
# This test works similarly to TestApproveRejectModeration, but it
# doesn't specify the user when saving the revision.
def setUp(self):
self.submitter = self.create_superuser(
username="submitter",

Wyświetl plik

@ -639,6 +639,9 @@ class TestDisablePreviewButton(WagtailTestUtils, TestCase):
self.assertNotContains(response, preview_url)
def disable_preview_in_moderation_list(self):
# RemovedInWagtail60Warning
# Remove this test when the deprecation period for the legacy
# moderation system ends.
stream_page = StreamPage(title="stream page", body=[("text", "hello")])
self.root_page.add_child(instance=stream_page)
latest_revision = stream_page.save_revision(

Wyświetl plik

@ -403,6 +403,9 @@ class TestPublishScheduledPagesCommand(WagtailTestUtils, TestCase):
self.assertFalse(p.expired)
def test_expired_pages_are_dropped_from_mod_queue(self):
# RemovedInWagtail60Warning
# Remove this test when the deprecation period for the legacy
# moderation system ends.
page = SimplePage(
title="Hello world!",
slug="hello-world",
@ -657,6 +660,9 @@ class TestPurgeRevisionsCommandForPages(TestCase):
self.assertRevisionExists(revision_2)
def test_revisions_in_moderation_or_workflow_not_purged(self):
# RemovedInWagtail60Warning
# Remove the lines until the first assertion when the deprecation period#
# for the legacy moderation system ends.
revision = self.object.save_revision(submitted_for_moderation=True)
# Save a new revision to ensure that the moderated revision

Wyświetl plik

@ -1480,6 +1480,9 @@ class TestCopyPage(TestCase):
)
def test_copy_page_copies_revisions_and_doesnt_submit_for_moderation(self):
# RemovedInWagtail60Warning
# Remove this test when the deprecation period for the legacy
# moderation system ends.
christmas_event = EventPage.objects.get(url_path="/home/events/christmas/")
christmas_event.save_revision(submitted_for_moderation=True)
@ -1504,6 +1507,9 @@ class TestCopyPage(TestCase):
def test_copy_page_copies_revisions_and_doesnt_change_created_at(self):
christmas_event = EventPage.objects.get(url_path="/home/events/christmas/")
# RemovedInWagtail60Warning
# Remove this line when the deprecation period for the legacy
# moderation system ends.
christmas_event.save_revision(submitted_for_moderation=True)
# Set the created_at of the revision to a time in the past