Skip to content

Commit d6e3cc0

Browse files
committed
Update to use assertQuerySetEqual for Django 4.2+
Add TestCase with fallback.
1 parent 8ac0865 commit d6e3cc0

File tree

2 files changed

+130
-122
lines changed

2 files changed

+130
-122
lines changed

django_filters/compat.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1+
import django
12
from django.conf import settings
3+
from django.test import TestCase
4+
5+
if django.VERSION < (4, 2):
6+
class TestCase(TestCase):
7+
assertQuerySetEqual = TestCase.assertQuerysetEqual
8+
29

310
# django-crispy-forms is optional
411
try:

0 commit comments

Comments
 (0)