From 8c3d6a4899b01f1b9fcfa5e0facb15ae2d16df31 Mon Sep 17 00:00:00 2001 From: "Freeman,Yu" Date: Thu, 25 Apr 2024 13:52:04 +0800 Subject: [PATCH] remove testcase logic for versioning 2.0.0, as its not suggest to use --- tests/test_monkeypatch.py | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/tests/test_monkeypatch.py b/tests/test_monkeypatch.py index de98beca..822576d6 100644 --- a/tests/test_monkeypatch.py +++ b/tests/test_monkeypatch.py @@ -42,13 +42,7 @@ def test_get_edit_link(self, mock_is_obj_review_locked): ) # We test that moderation check is called when getting an edit link self.assertTrue(mock_is_obj_review_locked.called) - if versioning_version != "2.0.0": - # Edit link is inactive as `mock_is_obj_review_locked` is True - self.assertIn("inactive", edit_link) - else: - # Edit link is removed as `mock_is_obj_review_locked` is True - self.assertEqual("", edit_link) - # self.assertIn("inactive", edit_link) + self.assertIn("inactive", edit_link) @mock.patch("djangocms_moderation.monkeypatch.is_registered_for_moderation") @mock.patch("djangocms_moderation.monkeypatch.is_obj_review_locked") @@ -92,12 +86,7 @@ def test_get_archive_link(self, _mock): archive_link = "" # We test that moderation check is called when getting an edit link self.assertEqual(1, _mock.call_count) - if versioning_version != "2.0.0": - # Edit link is inactive as `mock_is_obj_review_locked` is True - self.assertIn("inactive", archive_link) - else: - # Edit link is unavailable - self.assertEqual("", archive_link) + self.assertIn("inactive", archive_link) _mock.return_value = None archive_link = self.version_admin._get_archive_link(version, self.mock_request)