#19203: Test failing when pytz not installed and not in "America/Chicago"
--------------------------------------------+------------------------
Reporter: lrekucki | Owner: nobody
Type: Uncategorized | Status: new
Component: contrib.humanize | Version: 1.4
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
--------------------------------------------+------------------------
{{{
======================================================================
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.
--
Ticket URL: <https://code.djangoproject.com/ticket/19203>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.