Fixed tests

This commit is contained in:
Ken Tsang
2017-07-10 12:25:01 +01:00
parent e3e6376c68
commit bdf3f20f4c
2 changed files with 5 additions and 5 deletions

View File

@@ -55,7 +55,7 @@ def test_should_not_allow_files_to_be_uploaded_without_the_correct_permission(
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
assert response.status_code == 200
assert page.select('main p')[0].text.strip() == "Sending text messages is an invitationonly feature."
assert page.select('main p')[0].text.strip() == "Sending text messages has been disabled for your service."
assert page.select(".page-footer-back-link")[0].text == "Back to the template"
assert page.select(".page-footer-back-link")[0]['href'] == url_for(
'.view_template',
@@ -353,7 +353,7 @@ def test_send_one_off_does_not_send_without_the_correct_permissions(
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
assert response.status_code == 200
assert page.select('main p')[0].text.strip() == "Sending text messages is an invitationonly feature."
assert page.select('main p')[0].text.strip() == "Sending text messages has been disabled for your service."
assert page.select(".page-footer-back-link")[0].text == "Back to the template"
assert page.select(".page-footer-back-link")[0]['href'] == url_for(
'.view_template',

View File

@@ -286,7 +286,7 @@ def test_should_not_allow_creation_of_template_through_form_without_correct_perm
assert response.status_code == 200
assert page.select('main p')[0].text.strip() == \
"Sending {} is an invitationonly feature.".format(template_description[type_of_template])
"Sending {} has been disabled for your service.".format(template_description[type_of_template])
assert page.select(".page-footer-back-link")[0].text == "Back to add new template"
assert page.select(".page-footer-back-link")[0]['href'] == url_for(
'.add_template_by_type',
@@ -315,7 +315,7 @@ def test_should_not_allow_creation_of_a_template_without_correct_permission(
assert response.status_code == 200
assert page.select('main p')[0].text.strip() == \
"Sending {} is an invitationonly feature.".format(template_description[type_of_template])
"Sending {} has been disabled for your service.".format(template_description[type_of_template])
assert page.select(".page-footer-back-link")[0].text == "Back to templates"
assert page.select(".page-footer-back-link")[0]['href'] == url_for(
'.choose_template',
@@ -411,7 +411,7 @@ def test_should_not_allow_template_edits_without_correct_permission(
page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser')
assert response.status_code == 200
assert page.select('main p')[0].text.strip() == "Sending text messages is an invitationonly feature."
assert page.select('main p')[0].text.strip() == "Sending text messages has been disabled for your service."
assert page.select(".page-footer-back-link")[0].text == "Back to the template"
assert page.select(".page-footer-back-link")[0]['href'] == url_for(
'.view_template',