Opened 15 years ago

Closed 15 years ago

Last modified 13 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: dev
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

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 by Karen Tracey, 15 years ago

milestone: 1.2
Triage Stage: UnreviewedAccepted

comment:2 by Russell Keith-Magee, 15 years ago

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 by anonymous, 15 years ago

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

comment:4 by Karen Tracey, 15 years ago

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

in reply to:  3 comment:5 by Karen Tracey, 15 years ago

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.

in reply to:  4 comment:6 by Karen Tracey, 15 years ago

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 by Russell Keith-Magee, 15 years ago

Resolution: fixed
Status: newclosed

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

comment:8 by Jacob, 13 years ago

milestone: 1.2

Milestone 1.2 deleted

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