Opened 12 years ago

Closed 12 years ago

#18321 closed Bug (wontfix)

generic_views unit tests are not respecting database feature supports_timezones

Reported by: Michael Manfre Owned by: nobody
Component: Testing framework Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Tests that specifically target timezone support, should be skipped if the database backend states it does not support timezones.

Attachments (1)

django-ticket18321.diff (3.6 KB ) - added by Michael Manfre 12 years ago.

Download all attachments as: .zip

Change History (2)

by Michael Manfre, 12 years ago

Attachment: django-ticket18321.diff added

comment:1 by Aymeric Augustin, 12 years ago

Resolution: wontfix
Status: newclosed

MySQL, SQLite and Oracle have support_timezones = False because either they're unable to store aware datetimes or their Python adapters are unable to handle them.

But it's important to test that they behave correctly when USE_TZ = True. Your patch would disable several tests for these three backends, which isn't acceptable. I suspect you misunderstood the meaning of the supports_timezones feature flag.

(Also, there are other tests that require timezone support, starting with tests.modeltests.timezones, I'm not sure why the patch only applies to tests.regressiontests.generic_views.)

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