mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 14:09:20 -04:00
more test fixes, one test remaining
This commit is contained in:
@@ -493,7 +493,7 @@ def test_caseworker_sees_template_page_if_template_is_deleted(
|
||||
|
||||
content = str(page)
|
||||
assert url_for("main.send_one_off", service_id=SERVICE_ONE_ID, template_id=fake_uuid) not in content
|
||||
assert page.select('p.hint')[0].text.strip() == 'This template was deleted today at 3:00pm.'
|
||||
assert page.select('p.hint')[0].text.strip() == 'This template was deleted today at 10:00am.'
|
||||
|
||||
mock_get_deleted_template.assert_called_with(SERVICE_ONE_ID, template_id, None)
|
||||
|
||||
@@ -1867,7 +1867,7 @@ def test_should_show_delete_template_page_with_time_block(
|
||||
mocker.patch('app.template_statistics_client.get_last_used_date_for_template',
|
||||
return_value='2012-01-01 12:00:00')
|
||||
|
||||
with freeze_time('2012-01-01 12:10:00'):
|
||||
with freeze_time('2012-01-01 7:10:00'):
|
||||
page = client_request.get(
|
||||
'.delete_service_template',
|
||||
service_id=SERVICE_ONE_ID,
|
||||
@@ -1999,7 +1999,7 @@ def test_should_show_page_for_a_deleted_template(
|
||||
content = str(page)
|
||||
assert url_for("main.edit_service_template", service_id=SERVICE_ONE_ID, template_id=fake_uuid) not in content
|
||||
assert url_for("main.send_one_off", service_id=SERVICE_ONE_ID, template_id=fake_uuid) not in content
|
||||
assert page.select('p.hint')[0].text.strip() == 'This template was deleted today at 3:00pm.'
|
||||
assert page.select('p.hint')[0].text.strip() == 'This template was deleted today at 10:00am.'
|
||||
assert 'Delete this template' not in page.select_one('main').text
|
||||
|
||||
mock_get_deleted_template.assert_called_with(SERVICE_ONE_ID, template_id, None)
|
||||
|
||||
Reference in New Issue
Block a user