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:
Richard Chapman
2018-03-05 14:11:37 +00:00
parent a9a67ce542
commit a4feaba309
6 changed files with 272 additions and 14 deletions

View File

@@ -76,3 +76,7 @@ def get_letter_pdf(notification):
file_content = obj.get()["Body"].read()
return file_content
def is_precompiled_letter(template):
return template.hidden and template.name == current_app.config['PRECOMPILED_TEMPLATE_NAME']