Skip to content

Commit

Permalink
Update to use assertQuerySetEqual for Django 4.2+
Browse files Browse the repository at this point in the history
Add TestCase with fallback.
  • Loading branch information
carltongibson committed Apr 23, 2023
1 parent 8ac0865 commit 90768fe
Show file tree
Hide file tree
Showing 2 changed files with 130 additions and 122 deletions.
7 changes: 7 additions & 0 deletions django_filters/compat.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import django
from django.conf import settings
from django.test import TestCase

if django.VERSION < (4, 2):
class TestCase(TestCase):
assertQuerySetEqual = TestCase.assertQuerysetEqual


# django-crispy-forms is optional
try:
Expand Down
Loading

0 comments on commit 90768fe

Please sign in to comment.