Revert config changes so it doesn't break local dev builds.

Update tests
This commit is contained in:
Rebecca Law
2016-03-09 09:29:35 +00:00
parent 29ddad60e7
commit 87496aa884
4 changed files with 17 additions and 18 deletions

View File

@@ -1,5 +1,7 @@
from flask import url_for
import app
def test_should_render_forgot_password(app_):
with app_.test_request_context():
@@ -12,8 +14,9 @@ def test_should_render_forgot_password(app_):
def test_should_redirect_to_password_reset_sent_for_valid_email(
app_,
api_user_active,
mock_reset_user_password):
mocker):
with app_.test_request_context():
mocker.patch('app.user_api_client.send_reset_password_url', return_value=None)
response = app_.test_client().post(
url_for('.forgot_password'),
data={'email_address': api_user_active.email_address})
@@ -21,4 +24,4 @@ def test_should_redirect_to_password_reset_sent_for_valid_email(
assert (
'You have been sent an email containing a link'
' to reset your password.') in response.get_data(as_text=True)
mock_reset_user_password.assert_called_once_with(api_user_active.email_address)
app.user_api_client.send_reset_password_url.assert_called_once_with(api_user_active.email_address)