Opened 5 years ago

Closed 4 years ago

#11291 closed (duplicate)

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

Reported by: justinlilly Owned by: justinlilly
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: UI/UX:


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 justinlilly 5 years ago.
django-11291r2.diff (818 bytes) - added by justinlilly 5 years ago.
Doh! Missed the teardown method.

Download all attachments as: .zip

Change History (5)

Changed 5 years ago by justinlilly


comment:1 Changed 5 years ago by justinlilly

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to justinlilly
  • Patch needs improvement unset
  • Status changed from new to assigned

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

Changed 5 years ago by justinlilly

Doh! Missed the teardown method.

comment:2 Changed 5 years ago by justinlilly

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

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

Duplicate of #10976

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.