Opened 15 years ago

Closed 14 years ago

#11291 closed (duplicate)

django.contrib.auth.tests don't respect url conf

Reported by: Justin Lilly Owned by: Justin Lilly
Component: contrib.auth Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The tests for auth override the ROOT_URL_CONF, which causes failures if you have edited the base admin template to include a {% url %} tag. In my case, this is for tinymce (via django-tinymce). Instead, it should respect the urls in my project (considering the tests run when I run my project's tests, if its an installed app), so as not to create false failures.

Attachments (2)

django-11219.diff (639 bytes ) - added by Justin Lilly 15 years ago.
Fix.
django-11291r2.diff (818 bytes ) - added by Justin Lilly 15 years ago.
Doh! Missed the teardown method.

Download all attachments as: .zip

Change History (5)

by Justin Lilly, 15 years ago

Attachment: django-11219.diff added

Fix.

comment:1 by Justin Lilly, 15 years ago

Has patch: set
Owner: changed from nobody to Justin Lilly
Status: newassigned

The issue was related to the PasswordResetTests needlessly overriding the setUp method, even though it was inheriting AuthViewsTestCase, which provides a better setUp method.

by Justin Lilly, 15 years ago

Attachment: django-11291r2.diff added

Doh! Missed the teardown method.

comment:2 by Justin Lilly, 15 years ago

Just to clarify, the fix wasn't to add my url conf to the tests, but rather exclude the need for that by having the auth tests use its own templates. That said, it was an auth templates bug, not an auth view bug.

comment:3 by Russell Keith-Magee, 14 years ago

Resolution: duplicate
Status: assignedclosed

Duplicate of #10976

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