From 5e4aff2a7b6e29305b8a6ad3d6ec472896e11d54 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 19 Jun 2017 15:00:12 +0100 Subject: [PATCH] Refactor test to match subsequent line MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Easier to read these asserts if they’re formatted the same. --- tests/app/main/views/test_notifications.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/app/main/views/test_notifications.py b/tests/app/main/views/test_notifications.py index d5aceaecd..7decfcd80 100644 --- a/tests/app/main/views/test_notifications.py +++ b/tests/app/main/views/test_notifications.py @@ -43,7 +43,9 @@ def test_notification_status_page_shows_details( notification_id=fake_uuid ) - assert page.find('div', {'class': 'sms-message-wrapper'}).text.strip() == 'service one: template content' + assert normalize_spaces(page.select('.sms-message-wrapper')[0].text) == ( + 'service one: template content' + ) assert normalize_spaces(page.select('.ajax-block-container p')[0].text) == ( expected_status )