Code

Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#12998 closed (fixed)

RSS feed test fails in various situations due to time check

Reported by: Leo 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

Attachments (0)

Change History (8)

comment:1 Changed 4 years ago by kmtracey

  • milestone set to 1.2
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 4 years ago by russellm

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 follow-up: Changed 4 years ago by anonymous

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

comment:4 follow-up: Changed 4 years ago by kmtracey

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 4 years ago by kmtracey

  • Summary changed from RSS feed test fails on windows to RSS 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 4 years ago by kmtracey

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 4 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:8 Changed 3 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.