Opened 5 years ago

Closed 3 years ago

#14478 closed Bug (fixed)

Couple of tests make assumptions about configuration

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

Description

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 claudep 4 years ago.
Improved tests in current trunk

Download all attachments as: .zip

Change History (6)

comment:1 Changed 5 years ago by gabrielhurley

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

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

  • Severity set to Normal
  • Type set to Bug

Changed 4 years ago by claudep

Improved tests in current trunk

comment:3 Changed 4 years ago by claudep

  • Easy pickings unset
  • Has patch set
  • UI/UX unset
  • Version changed from 1.2 to SVN

The USE_I18N setting in sitemaps has been addressed in #14833

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

In [7676d6e764c47c9d33a755c3b861034b32de77ac]:

Made sitemaps tests use override_settings. Refs #14478

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

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

In [6522283a712af96a98e99d675b69ca15aadbace8]:

Fixed #14478 -- Isolated messages tests from custom TEMPLATE_CONTEXT_PROCESSORS

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