From fcf8c834c9d31ac7b5bbc59b2890f14f6d05caec Mon Sep 17 00:00:00 2001 From: "Freeman,Yu" Date: Wed, 24 Apr 2024 16:50:56 +0800 Subject: [PATCH] fix testcases issue for djangocms-versioning 2.0.0 --- tests/requirements/dj42_cms41.txt | 2 +- tests/requirements/dj50_cms41.txt | 2 +- tests/test_monkeypatch.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/requirements/dj42_cms41.txt b/tests/requirements/dj42_cms41.txt index d2ef85cc..824d76f5 100644 --- a/tests/requirements/dj42_cms41.txt +++ b/tests/requirements/dj42_cms41.txt @@ -3,5 +3,5 @@ Django>=4.2,<5.0 django-cms>=4.1,<4.2 -djangocms-versioning>=2.0.0 +djangocms-versioning>=2.0.1 djangocms-alias>=2.0.0 diff --git a/tests/requirements/dj50_cms41.txt b/tests/requirements/dj50_cms41.txt index 53ea1d28..8461ac03 100644 --- a/tests/requirements/dj50_cms41.txt +++ b/tests/requirements/dj50_cms41.txt @@ -3,5 +3,5 @@ Django>=5.0,<5.1 django-cms>=4.1,<4.2 -djangocms-versioning>=2.0.0 +djangocms-versioning>=2.0.1 djangocms-alias>=2.0.0 diff --git a/tests/test_monkeypatch.py b/tests/test_monkeypatch.py index 3817b0b6..de98beca 100644 --- a/tests/test_monkeypatch.py +++ b/tests/test_monkeypatch.py @@ -42,7 +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": + if versioning_version != "2.0.0": # Edit link is inactive as `mock_is_obj_review_locked` is True self.assertIn("inactive", edit_link) else: @@ -92,7 +92,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": + if versioning_version != "2.0.0": # Edit link is inactive as `mock_is_obj_review_locked` is True self.assertIn("inactive", archive_link) else: