mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-25 11:04:02 +03:00
Fix tests with mock timezone (#7911)
After django/django#13877, Django no longer checks for `hasattr(timezone, 'localize')` and instead does an inheritance check.
This commit is contained in:
parent
f628db383a
commit
a0a2c5cb37
|
@ -1485,7 +1485,7 @@ class TestNaiveDayLightSavingTimeTimeZoneDateTimeField(FieldValues):
|
|||
}
|
||||
outputs = {}
|
||||
|
||||
class MockTimezone:
|
||||
class MockTimezone(pytz.BaseTzInfo):
|
||||
@staticmethod
|
||||
def localize(value, is_dst):
|
||||
raise pytz.InvalidTimeError()
|
||||
|
|
Loading…
Reference in New Issue
Block a user