From 6364b7de47e97b284c787e8fcf29c8ee2765e63e Mon Sep 17 00:00:00 2001 From: Valentin Deniaud Date: Mon, 10 May 2021 12:23:54 +0200 Subject: [PATCH] templates: state password reset email is always sent (#53597) --- .../registration/password_reset_instructions.html | 2 +- tests/test_password_reset.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/authentic2/templates/registration/password_reset_instructions.html b/src/authentic2/templates/registration/password_reset_instructions.html index 4aa2aad8..dc17f099 100644 --- a/src/authentic2/templates/registration/password_reset_instructions.html +++ b/src/authentic2/templates/registration/password_reset_instructions.html @@ -12,7 +12,7 @@

{% blocktrans with email=request.session.reset_email %} - If your email address exists in our database, an email has been sent to {{ email }}. + An email has been sent to {{ email }}. {% endblocktrans %}

diff --git a/tests/test_password_reset.py b/tests/test_password_reset.py index d544c8b4..5e6d0b46 100644 --- a/tests/test_password_reset.py +++ b/tests/test_password_reset.py @@ -78,7 +78,7 @@ def test_can_reset_by_username(app, db, simple_user, settings, mailoutbox): resp.form.set('email_or_username', simple_user.username) resp = resp.form.submit().follow() - assert 'an email has been sent to %s' % simple_user.username in resp + assert 'An email has been sent to %s' % simple_user.username in resp assert len(mailoutbox) == 1 assert mailoutbox[0].to == [simple_user.email] @@ -97,7 +97,7 @@ def test_can_reset_by_username_with_email(app, db, simple_user, settings, mailou resp = app.get('/accounts/password/reset/') resp.form.set('email_or_username', simple_user.email) resp = resp.form.submit().follow() - assert 'an email has been sent to %s' % simple_user.username in resp + assert 'An email has been sent to %s' % simple_user.username in resp assert len(mailoutbox) == 1 @@ -106,7 +106,7 @@ def test_reset_by_email_no_account(app, db, mailoutbox): resp.form.set('email', 'john.doe@example.com') resp = resp.form.submit().follow() - assert 'an email has been sent to john.doe@example.com' in resp + assert 'An email has been sent to john.doe@example.com' in resp assert len(mailoutbox) == 1 assert 'no account was found' in mailoutbox[0].body @@ -117,7 +117,7 @@ def test_can_reset_by_username_no_account(app, db, settings, mailoutbox): resp = app.get('/accounts/password/reset/') resp.form.set('email_or_username', 'john.doe') resp = resp.form.submit().follow() - assert 'an email has been sent to john.doe' in resp + assert 'An email has been sent to john.doe' in resp assert len(mailoutbox) == 0 @@ -127,7 +127,7 @@ def test_can_reset_by_username_no_account_email(app, db, settings, mailoutbox): resp = app.get('/accounts/password/reset/') resp.form.set('email_or_username', 'john.doe@example.com') resp = resp.form.submit().follow() - assert 'an email has been sent to john.doe' in resp + assert 'An email has been sent to john.doe' in resp assert len(mailoutbox) == 1 -- 2.20.1