Skip to content

Commit

Permalink
tests(account): Test PasswordResetDoneView/LoginRequiredMiddleware
Browse files Browse the repository at this point in the history
  • Loading branch information
pennersr committed Nov 1, 2024
1 parent ca4dcef commit 8229bce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ChangeLog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ Fixes
- A ``NoReverseMatch`` could occur when using ``ACCOUNT_LOGIN_BY_CODE_REQUIRED =
True`` while ``ACCOUNT_LOGIN_BY_CODE_ENABLED = False``, fixed.

- The ``PasswordResetDoneView`` did not behave correctly when using Django's
``LoginRequiredMiddleware``, as it was not properly marked as
``@login_not_required``.


65.1.0 (2024-10-23)
*******************
Expand Down
4 changes: 3 additions & 1 deletion allauth/account/tests/test_reset_password.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ def f(user):
@pytest.mark.django_db
def test_reset_password_unknown_account(client, settings):
settings.ACCOUNT_PREVENT_ENUMERATION = True
client.post(
resp = client.post(
reverse("account_reset_password"),
data={"email": "[email protected]"},
follow=True,
)
assert len(mail.outbox) == 1
assert mail.outbox[0].to == ["[email protected]"]
assert resp.redirect_chain == [(reverse("account_reset_password_done"), 302)]


@pytest.mark.django_db
Expand Down

0 comments on commit 8229bce

Please sign in to comment.