fix placeholders not appearing in email subject

it now switches utils.template.Template type, since the base Template
type now no longer has a subject attribute.

updated test case to use `sample_email_template_with_placeholders`
instead of `sample_email_template`
This commit is contained in:
Leo Hemsted
2016-12-22 14:40:33 +00:00
parent 6bf024569a
commit 3ed97151ee
3 changed files with 25 additions and 19 deletions

View File

@@ -218,12 +218,9 @@ def sample_email_template(
'template_type': template_type,
'content': content,
'service': service,
'created_by': user
'created_by': user,
'subject': subject_line
}
if subject_line:
data.update({
'subject': subject_line
})
template = Template(**data)
dao_create_template(template)
return template