diff --git a/tests/test_admin.py b/tests/test_admin.py index 14a4ba9e..f5083efd 100644 --- a/tests/test_admin.py +++ b/tests/test_admin.py @@ -58,6 +58,10 @@ from djangocms_versioning.test_utils.polls.cms_config import PollsCMSConfig from djangocms_versioning.test_utils.polls.models import Answer, Poll, PollContent +if not hasattr(CMSTestCase, "assertQuerySetEqual"): + # Django < 4.2 + CMSTestCase.assertQuerySetEqual = CMSTestCase.assertQuerysetEqual + class BaseStateTestCase(CMSTestCase): def assertRedirectsToVersionList(self, response, version): diff --git a/tests/test_datastructures.py b/tests/test_datastructures.py index cdea40c9..74d6ada9 100644 --- a/tests/test_datastructures.py +++ b/tests/test_datastructures.py @@ -11,6 +11,10 @@ from djangocms_versioning.test_utils.people.models import PersonContent from djangocms_versioning.test_utils.polls.models import Poll, PollContent +if not hasattr(CMSTestCase, "assertQuerySetEqual"): + # Django < 4.2 + CMSTestCase.assertQuerySetEqual = CMSTestCase.assertQuerysetEqual + class VersionableItemTestCase(CMSTestCase): def setUp(self): diff --git a/tests/test_models.py b/tests/test_models.py index 98ac5b3e..830eebbd 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -12,6 +12,10 @@ from djangocms_versioning.test_utils.polls.cms_config import PollsCMSConfig from djangocms_versioning.test_utils.polls.models import Poll, PollContent +if not hasattr(CMSTestCase, "assertQuerySetEqual"): + # Django < 4.2 + CMSTestCase.assertQuerySetEqual = CMSTestCase.assertQuerysetEqual + class CopyTestCase(CMSTestCase): def _create_versionables_mock(self, copy_function):