Set postage on basis of postage argument or template postage

This commit is contained in:
Pea Tyczynska
2019-02-05 12:48:40 +00:00
parent f6d3e87de5
commit 5b9e6c2086
9 changed files with 63 additions and 69 deletions

View File

@@ -253,6 +253,8 @@ def sample_template(
data.update({
'subject': subject_line
})
if template_type == 'letter':
data['postage'] = 'second'
template = Template(**data)
dao_create_template(template)
@@ -317,8 +319,8 @@ def sample_template_without_email_permission(notify_db, notify_db_session):
@pytest.fixture
def sample_letter_template(sample_service_full_permissions):
return create_template(sample_service_full_permissions, template_type=LETTER_TYPE)
def sample_letter_template(sample_service_full_permissions, postage="second"):
return create_template(sample_service_full_permissions, template_type=LETTER_TYPE, postage=postage)
@pytest.fixture