mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-04-13 05:41:11 -04:00
Fixed tests
This commit is contained in:
@@ -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 invitation‑only 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 invitation‑only 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',
|
||||
|
||||
@@ -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 invitation‑only 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 invitation‑only 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 invitation‑only 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',
|
||||
|
||||
Reference in New Issue
Block a user