Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#12998 closed (fixed)

RSS feed test fails in various situations due to time check

Reported by: Leo Shklovskii Owned by: nobody
Component: contrib.syndication Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

======================================================================
FAIL: test_rss2_feed (regressiontests.syndication.tests.SyndicationFeedTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Code\django\tests\regressiontests\syndication\tests.py", line 67, in
test_rss2_feed
    'copyright': 'Copyright (c) 2007, Sally Smith',
  File "C:\Code\django\tests\regressiontests\syndication\tests.py", line 25, in
assertChildNodeContent
    elem.getElementsByTagName(k)[0].firstChild.wholeText, v)
AssertionError: u'Thu, 03 Jan 2008 13:30:00 -0800' != 'Thu, 03 Jan 2008 13:30:00
 -0600'
----------------------------------------------------------------------

I'm in the Pacific Time Zone and I suspect this has to do with the note here: http://docs.djangoproject.com/en/dev/ref/settings/#time-zone

An easy solution to this would just be to remove checking for the lastBuildDate in tests/regressiontests/syndication/tests.py:64 in r12623

Change History (8)

comment:1 Changed 7 years ago by Karen Tracey

milestone: 1.2
Triage Stage: UnreviewedAccepted

comment:2 Changed 7 years ago by Russell Keith-Magee

This isn't Windows specific - In 1.2, it also affects any test setup where TIMEZONE=None and the system timezone isn't UTC.

comment:3 Changed 7 years ago by anonymous

Is the workaround then to just set TIMEZONE in my settings for running the tests?

comment:4 Changed 7 years ago by Karen Tracey

The end of DST in the US has revealed another problem with the time check in this test, see: #13113

comment:5 in reply to:  3 Changed 7 years ago by Karen Tracey

Summary: RSS feed test fails on windowsRSS feed test fails in various situations due to time check

Replying to anonymous:

Is the workaround then to just set TIMEZONE in my settings for running the tests?

That doesn't work on Windows, and if someone wants/needs to run with TIMEZONE=None it's also not good to have to put something else in the test settings file.

comment:6 in reply to:  4 Changed 7 years ago by Karen Tracey

Replying to kmtracey:

The end of DST in the US has revealed another problem with the time check in this test, see: #13113

That would be the start of DST, not the end. Really missing my hour of sleep.

comment:7 Changed 7 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

(In [12791]) Fixed #12998 -- Corrected handling of time zones in syndication framework.

comment:8 Changed 5 years ago by Jacob

milestone: 1.2

Milestone 1.2 deleted

Note: See TracTickets for help on using tickets.
Back to Top