mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-06 02:18:24 -04:00
Added the mock for the admin_api_client
This commit is contained in:
@@ -13,8 +13,10 @@ def test_should_render_new_password_template(notifications_admin, notifications_
|
|||||||
assert ' You can now create a new password for your account.' in response.get_data(as_text=True)
|
assert ' You can now create a new password for your account.' in response.get_data(as_text=True)
|
||||||
|
|
||||||
|
|
||||||
def test_should_redirect_to_two_factor_when_password_reset_is_successful(notifications_admin, notifications_admin_db,
|
def test_should_redirect_to_two_factor_when_password_reset_is_successful(notifications_admin,
|
||||||
notify_db_session):
|
notifications_admin_db,
|
||||||
|
notify_db_session,
|
||||||
|
mocker):
|
||||||
with notifications_admin.test_request_context():
|
with notifications_admin.test_request_context():
|
||||||
with notifications_admin.test_client() as client:
|
with notifications_admin.test_client() as client:
|
||||||
user = create_test_user('active')
|
user = create_test_user('active')
|
||||||
@@ -54,3 +56,7 @@ def test_should_return_raise_no_data_found_exception_when_email_address_does_not
|
|||||||
fail('Expected NoDataFoundException')
|
fail('Expected NoDataFoundException')
|
||||||
except NoDataFoundException:
|
except NoDataFoundException:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def _set_up_mocker(mocker):
|
||||||
|
mocker.patch("app.admin_api_client.send_sms")
|
||||||
|
|||||||
Reference in New Issue
Block a user