#16517 closed Bug (duplicate)
Django tests fail if project LOGIN_URL setting doesn't end with '/login/'
Reported by: | Bjorn Kristinsson | Owned by: | nobody |
---|---|---|---|
Component: | contrib.auth | Version: | 1.3 |
Severity: | Normal | Keywords: | |
Cc: | bjornkri@… | Triage Stage: | Unreviewed |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
To reproduce:
Start a new project, edit settings.py and add:
... LOGIN_URL = '/foobar/' ... 'ENGINE': 'django.db.backends.sqlite3',
(Adding sqlite3 to the database engine setting so the tests will run)
Running ./manage.py test will now fail.
The culprit is in test_password_change_done_fails() in /django/contrib/auth/tests/views.py:
self.assertTrue(response['Location'].endswith('/login/?next=/password_change/done/'))
Patch attached that replaces his line with
self.assertTrue(response['Location'].endswith('/?next=/password_change/done/'))
Attachments (1)
Change History (4)
by , 13 years ago
Attachment: | test_password_change_done_fails.diff added |
---|
comment:1 by , 13 years ago
Cc: | added |
---|
comment:2 by , 13 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
comment:3 by , 13 years ago
Ah. At least now we have a result for "test_password_change_done_fails" which is what I went looking for ;)
This was reported in #16413 — which is the first search result for "LOGIN_URL" :)