File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 16
16
except ImportError :
17
17
pytz = None
18
18
19
+ import django
19
20
from django .core .exceptions import ValidationError as DjangoValidationError
20
21
from django .db .models import IntegerChoices , TextChoices
21
22
from django .http import QueryDict
@@ -1624,7 +1625,8 @@ def test_should_render_date_time_in_default_timezone(self):
1624
1625
assert rendered_date == rendered_date_in_timezone
1625
1626
1626
1627
1627
- @pytest .mark .skipif (pytz is None , reason = "Django 5.0 has removed pytz; this test should eventually be able to get removed." )
1628
+ @pytest .mark .skipif (pytz is None or django .VERSION >= (5 ,),
1629
+ reason = "Django 5.0 has removed pytz; this test should eventually be able to get removed." )
1628
1630
class TestPytzNaiveDayLightSavingTimeTimeZoneDateTimeField (FieldValues ):
1629
1631
"""
1630
1632
Invalid values for `DateTimeField` with datetime in DST shift (non-existing or ambiguous) and timezone with DST.
You can’t perform that action at this time.
0 commit comments