From a1203d75ea819de5ae6fafa49529cb04a05d760b Mon Sep 17 00:00:00 2001 From: Adam Shimali Date: Fri, 18 Mar 2016 11:20:08 +0000 Subject: [PATCH] Unit test bug fix. Page structure change. --- tests/app/main/views/test_code_not_received.py | 3 ++- tests/app/main/views/test_verify.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/app/main/views/test_code_not_received.py b/tests/app/main/views/test_code_not_received.py index f870877e1..48607d10f 100644 --- a/tests/app/main/views/test_code_not_received.py +++ b/tests/app/main/views/test_code_not_received.py @@ -23,7 +23,8 @@ def test_should_render_email_verification_resent_show_email_address_and_resend_v assert page.h1.string == 'Check your email' expected = "In order to verify your email address we've sent a new confirmation link to {}".format(api_user_active.email_address) # noqa - assert page.p.string == expected + message = page.find_all('p')[1].text + assert message == expected mock_send_verify_email.assert_called_with(api_user_active.id, api_user_active.email_address) diff --git a/tests/app/main/views/test_verify.py b/tests/app/main/views/test_verify.py index 896024f40..fd76e5cd6 100644 --- a/tests/app/main/views/test_verify.py +++ b/tests/app/main/views/test_verify.py @@ -17,7 +17,8 @@ def test_should_return_verify_template(app_, page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser') assert page.h1.text == 'Text verification' - assert page.p.text == "We've sent you a text message with a verification code." + message = page.find_all('p')[1].text + assert message == "We've sent you a text message with a verification code." def test_should_redirect_to_add_service_when_sms_code_is_correct(app_,