mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-18 21:44:11 -04:00
Don’t let people actually start a letter job
Who knows what would happen if a job with a letter template actually got into the database. `403`ing the page is a quick and dirty hack to stop this from happening.
This commit is contained in:
@@ -335,6 +335,21 @@ def mock_get_service_email_template(mocker):
|
||||
'app.service_api_client.get_service_template', side_effect=_create)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_get_service_letter_template(mocker):
|
||||
def _create(service_id, template_id):
|
||||
template = template_json(
|
||||
service_id,
|
||||
template_id,
|
||||
"Two week reminder",
|
||||
"letter",
|
||||
"Your vehicle tax is about to expire", "Subject")
|
||||
return {'data': template}
|
||||
|
||||
return mocker.patch(
|
||||
'app.service_api_client.get_service_template', side_effect=_create)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_create_service_template(mocker, fake_uuid):
|
||||
def _create(name, type_, content, service, subject=None):
|
||||
|
||||
Reference in New Issue
Block a user