======================================================================
FAIL: test_naturalday_uses_localtime (django.contrib.humanize.tests.HumanizeTest
s)
----------------------------------------------------------------------
Traceback (most recent call last):
File "c:\Users\lrekucki\Documents\GitHub\django\django\contrib\humanize\tests.
py", line 152, in test_naturalday_uses_localtime
self.humanize_tester([dt], ['yesterday'], 'naturalday')
File "c:\Users\lrekucki\Documents\GitHub\django\django\contrib\humanize\tests.
py", line 40, in humanize_tester
msg="%s test failed, produced '%s', should've produced '%s'" % (method, rend
ered, result))
AssertionError: naturalday test failed, produced 'today', should've produced 'ye
sterday'
----------------------------------------------------------------------
Ran 1 test in 1.305s
The problem is within get_default_timezone()
, which returns LocalTimezone
if there is no pytz installed. For me this is GMT+1 instead of asserted GMT-6, so the day stays the same. I think the test should just override the active timezone.
In aff9b2f5662f8a007bb90a427190c0d573a3ba65: