Opened 6 years ago

Closed 4 years ago

#14478 closed Bug (fixed)

Couple of tests make assumptions about configuration

Reported by: Travis Swicegood Owned by: nobody
Component: Contrib apps Version: master
Severity: Normal Keywords: tests
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


django.contrib.messages and django.contrib.sitemaps both run tests with certain assumptions that are not guaranteed. I've fixed both on my GitHub fork. They are available at:

The patches are against master, but I have tested the same changes against 1.2.3 and they work there as well.

Attachments (1)

14478.diff (3.6 KB) - added by Claude Paroz 5 years ago.
Improved tests in current trunk

Download all attachments as: .zip

Change History (6)

comment:1 Changed 6 years ago by Gabriel Hurley

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

The fix for sitemaps looks fine, but my inclination is that the messages test should restore settings.TEMPLATE_CONTEXT_PROCESSORS in the tearDown method the way other tests do for maximum isolation.

comment:2 Changed 5 years ago by Julien Phalip

Severity: Normal
Type: Bug

Changed 5 years ago by Claude Paroz

Attachment: 14478.diff added

Improved tests in current trunk

comment:3 Changed 5 years ago by Claude Paroz

Easy pickings: unset
Has patch: set
UI/UX: unset
Version: 1.2SVN

The USE_I18N setting in sitemaps has been addressed in #14833

comment:4 Changed 4 years ago by Claude Paroz <claude@…>

In [7676d6e764c47c9d33a755c3b861034b32de77ac]:

Made sitemaps tests use override_settings. Refs #14478

comment:5 Changed 4 years ago by Claude Paroz <claude@…>

Resolution: fixed
Status: newclosed

In [6522283a712af96a98e99d675b69ca15aadbace8]:

Fixed #14478 -- Isolated messages tests from custom TEMPLATE_CONTEXT_PROCESSORS

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