Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#20048 closed Bug (fixed)

Test failures in flatpages app when custom User model is in use

Reported by: Russell Keith-Magee Owned by: matiasb
Component: contrib.flatpages Version: 1.5
Severity: Release blocker Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

contrib.flatpages contains a number of tests that depend upon authenticated users. However, these tests fail if your app uses a custom User model.

These tests should be skipped if a custom User is defined.

An audit of other contrib apps should be performed for similar failures.

Change History (8)

comment:1 by matiasb, 12 years ago

Owner: changed from nobody to matiasb
Status: newassigned

comment:2 by matiasb, 12 years ago

Proposed pull request: https://github.com/django/django/pull/908.
Tests passing with SQLite.

Reviewing the other contrib apps, got failures for contrib.sitemaps, created #20060.

comment:3 by matiasb, 12 years ago

Has patch: set

comment:4 by Baptiste Mispelon, 12 years ago

Shouldn't the fixes in tests/forms.py (https://github.com/django/django/pull/908/files#diff-1) be part of a different ticket?

comment:5 by matiasb, 12 years ago

If that's preferred, sure. Worked this out here because there wasn't a ticket for that other test and I was fixing tests for flatpages.
Just let me know and I can add a ticket and rework the pull request.

comment:6 by Aymeric Augustin, 12 years ago

Triage Stage: AcceptedReady for checkin

I'm fine with the scope of this PR, and it looks good to me.

comment:7 by Russell Keith-Magee <russell@…>, 12 years ago

Resolution: fixed
Status: assignedclosed

In d35e621633640797d2db15ec2ff05ff97a3b80a6:

[1.5.x] Fixed #20048, #20060 -- Modified tests for contrib apps sensitive to custom User models.

Thanks to matiasb for the report of #20060 and the draft patch for #20048.

(cherry picked from commit 930af661abdb4eb7322f1ab06f21df9ed04af43d)

comment:8 by Russell Keith-Magee <russell@…>, 12 years ago

In 930af661abdb4eb7322f1ab06f21df9ed04af43d:

Fixed #20048, #20060 -- Modified tests for contrib apps sensitive to custom User models.

Thanks to matiasb for the report of #20060 and the draft patch for #20048.

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