mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 15:46:07 -05:00
Added tests to tests for precompiled flow and refactored a little
* Added is_precompiled_letter method to letter/utils.py * Added tests for letter/utils.py * Added tests for the rest endpoint * Moved the Precompiled name to a central location * Added hidden field to the test method to create a template
This commit is contained in:
@@ -125,12 +125,13 @@ def create_service_with_defined_sms_sender(
|
||||
|
||||
|
||||
def create_template(
|
||||
service,
|
||||
template_type=SMS_TYPE,
|
||||
template_name=None,
|
||||
subject='Template subject',
|
||||
content='Dear Sir/Madam, Hello. Yours Truly, The Government.',
|
||||
reply_to=None
|
||||
service,
|
||||
template_type=SMS_TYPE,
|
||||
template_name=None,
|
||||
subject='Template subject',
|
||||
content='Dear Sir/Madam, Hello. Yours Truly, The Government.',
|
||||
reply_to=None,
|
||||
hidden=False
|
||||
):
|
||||
data = {
|
||||
'name': template_name or '{} Template Name'.format(template_type),
|
||||
@@ -139,6 +140,7 @@ def create_template(
|
||||
'service': service,
|
||||
'created_by': service.created_by,
|
||||
'reply_to': reply_to,
|
||||
'hidden': hidden
|
||||
}
|
||||
if template_type != SMS_TYPE:
|
||||
data['subject'] = subject
|
||||
|
||||
Reference in New Issue
Block a user