Skip to content

Commit a0a2c5c

Browse files
Fix tests with mock timezone (#7911)
After django/django#13877, Django no longer checks for `hasattr(timezone, 'localize')` and instead does an inheritance check.
1 parent f628db3 commit a0a2c5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_fields.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1485,7 +1485,7 @@ class TestNaiveDayLightSavingTimeTimeZoneDateTimeField(FieldValues):
14851485
}
14861486
outputs = {}
14871487

1488-
class MockTimezone:
1488+
class MockTimezone(pytz.BaseTzInfo):
14891489
@staticmethod
14901490
def localize(value, is_dst):
14911491
raise pytz.InvalidTimeError()

0 commit comments

Comments
 (0)