Skip to content

Commit

Permalink
change the logic for compatiable testcases for django < 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
FreemanPancake committed Mar 14, 2024
1 parent 58af5c6 commit 33620d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions djangocms_url_manager/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

from packaging.version import Version


DJANGO_4_2 = Version(django.get_version()) < Version('4.3')
DJANGO_4_1 = Version(django.get_version()) < Version('4.2')


def get_page_placeholders(page, language=None):
Expand Down
4 changes: 2 additions & 2 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from djangocms_url_manager.compat import DJANGO_4_2
from djangocms_url_manager.compat import DJANGO_4_1


if not DJANGO_4_2: # TODO: remove when dropping support for Django < 4.2
if DJANGO_4_1: # TODO: remove when dropping support for Django < 4.2
from django.test.testcases import TransactionTestCase

TransactionTestCase.assertQuerySetEqual = TransactionTestCase.assertQuerysetEqual

0 comments on commit 33620d5

Please sign in to comment.