Skip to content

Commit

Permalink
Attempt to fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
saevarom committed Jul 19, 2024
1 parent f744256 commit d26e7f8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_filters.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import inspect
import unittest
from collections import OrderedDict
from datetime import date, datetime, time, timedelta
from unittest import mock

import django
from django import forms
from django.test import TestCase, override_settings
from django.utils import translation
Expand Down Expand Up @@ -1105,6 +1107,7 @@ def test_choices_with_optgroups_dont_mistmatch(self):
choices=[("group", ("a", "a")), ("b", "b")], filters={"a": None, "b": None}
)

@unittest.skipUnless(django.VERSION >= (5, 0), "Django 5.0 introduced new dictionary choices option")
def test_grouped_choices_as_dictionary(self):
DateRangeFilter(
choices={"group": {"a": "a", "b": "b"}}, filters={"a": None, "b": None}
Expand Down

0 comments on commit d26e7f8

Please sign in to comment.