Opened 16 years ago
Closed 16 years ago
#9095 closed (duplicate)
Auth has errors in unit tests when Admin isn't in INSTALLED_APPS
Reported by: | Sam Bull | Owned by: | nobody |
---|---|---|---|
Component: | contrib.auth | Version: | 1.0 |
Severity: | Keywords: | unittest test templates | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The contrib.auth module fails some of its unit tests with errors if contrib.admin isn't listed in INSTALLED_APPS.
This seems to be because contrib.auth is dependent on these templates:
- registration/password_change_form.html
- registration/password_reset_email.html
- registration/password_reset_form.html
These templates are in contrib/admin/templates/.
These are the tests that are failing:
- In ChangePasswordTest:
- test_password_change_fails_with_invalid_old_password
- test_password_change_fails_with_mismatched_passwords
- In PasswordResetTest
- test_confirm_complete
- test_confirm_different_passwords
- test_confirm_invalid
- test_confirm_invalid_post
- test_confirm_valid
- "Email is sent if a valid email address is provided for password reset" (test_email_found)
I'm attaching the output from when I run the tests.
PS- There are also errors in the tests if the content type or session applications are missing. This doesn't seem like as much of a problem since those apps are more integral to how auth works. They're also both part of the INSALLED_APPS list by default, unlike the admin app.
Attachments (1)
Change History (2)
by , 16 years ago
Attachment: | auth_unit_test_errors.txt added |
---|
comment:1 by , 16 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Duplicate of #7611. See this mailing list thread for a discussion of the underlying issues. You may also be interested in #4788, which may eventually yield a more attractive solution.