-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed #27891 -- Added PasswordResetConfirmView.post_reset_login_backend attribute. #8134
Conversation
I pushed a commit with some cosmetic edits. The test needs some enhancement so that it works as a regression test if |
Is that really a regression test? I think that would pass before and after this patch. I think the regression test would be to use multiple auth backends in the original test case and verify that the one selected in the URLconf is used. |
The test should not pass before this patch. That was exactly the error I was getting before working on this bug. I'll make right now another test as you suggest. |
|
Tim, you were right, I just removed the old test and updated the old one to check the backend used. Please tell me if you think is fine and I'll rebase and squash. Thanks. |
Yes, that's what I expected. I think it would be slightly clearer if the urlpattern used the second auth backend (AllowAllUsersModelBackend) instead. |
Awesome. I just updated it. How about now? |
tests/auth_tests/test_views.py
Outdated
@@ -336,7 +336,9 @@ def test_confirm_login_post_reset(self): | |||
] | |||
) | |||
def test_confirm_login_post_reset_custom_backend(self): | |||
backend = 'django.contrib.auth.backends.ModelBackend' | |||
# Please note this backend is set at the url. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# This backend is specified in the url().
tests/auth_tests/test_views.py
Outdated
backend = 'django.contrib.auth.backends.ModelBackend' | ||
# Please note this backend is set at the url. | ||
backend = 'django.contrib.auth.backends.AllowAllUsersModelBackend' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
skip the blank line
Looks like its ready |
https://code.djangoproject.com/ticket/27891#ticket