Code

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#14252 closed (fixed)

django.contrib.flatpages unit tests assume default value for settings.LOGIN_URL

Reported by: pmclanahan Owned by: tobias
Component: Contrib apps Version: 1.2
Severity: Keywords: flatpages tests
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

This causes them to break when running from a project's test suite (manage.py test) with the flatpages app installed, if the project sets LOGIN_URL to a non-default value. They would also break when running from Django's test suite with the LOGIN_URL setting non-default.

Attachments (1)

django-flatpages-tests.diff (2.1 KB) - added by pmclanahan 4 years ago.
Proposed fix

Download all attachments as: .zip

Change History (6)

Changed 4 years ago by pmclanahan

Proposed fix

comment:1 Changed 4 years ago by pmclanahan

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 4 years ago by tobias

  • Owner changed from nobody to tobias
  • Status changed from new to assigned

comment:3 Changed 4 years ago by tobias

  • Component changed from Uncategorized to Contrib apps
  • Triage Stage changed from Unreviewed to Ready for checkin

Tested and verified that this is an issue and the patch fixes it. Unfortunately the settings hackery is necessary because flatpages provides its own urls.py for tests.

It's a pretty simple change so I'm marking it RFC.

comment:4 Changed 4 years ago by lukeplant

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

(In [13851]) Fixed #14252 - django.contrib.flatpages unit tests assume default value for settings.LOGIN_URL

Thanks to pmclanahan for report and patch.

comment:5 Changed 4 years ago by lukeplant

(In [13853]) [1.2.X] Fixed #14252 - django.contrib.flatpages unit tests assume default value for settings.LOGIN_URL

Thanks to pmclanahan for report and patch.

Backport of [13851] from trunk

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.