Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#14252 closed (fixed)

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

Reported by: Paul McLanahan Owned by: Tobias McNulty
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 Paul McLanahan 6 years ago.
Proposed fix

Download all attachments as: .zip

Change History (6)

Changed 6 years ago by Paul McLanahan

Attachment: django-flatpages-tests.diff added

Proposed fix

comment:1 Changed 6 years ago by Paul McLanahan

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

comment:2 Changed 6 years ago by Tobias McNulty

Owner: changed from nobody to Tobias McNulty
Status: newassigned

comment:3 Changed 6 years ago by Tobias McNulty

Component: UncategorizedContrib apps
Triage Stage: UnreviewedReady 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 6 years ago by Luke Plant

Resolution: fixed
Status: assignedclosed

(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 6 years ago by Luke Plant

(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

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