Incorporate breaking utils changes

The `.replaced…` methods on instances of `Template` were removed in
https://github.com/alphagov/notifications-utils/pull/84
This commit is contained in:
Chris Hill-Scott
2016-12-02 10:26:03 +00:00
parent 9fb378021c
commit d449475dd5
7 changed files with 25 additions and 18 deletions

View File

@@ -17,14 +17,14 @@ from tests.app.conftest import sample_notification, sample_template, sample_emai
def test_create_content_for_notification_passes(sample_email_template):
template = Template.query.get(sample_email_template.id)
content = create_content_for_notification(template, None)
assert content.replaced == template.content
assert content.rendered == template.content
def test_create_content_for_notification_with_placeholders_passes(sample_template_with_placeholders):
template = Template.query.get(sample_template_with_placeholders.id)
content = create_content_for_notification(template, {'name': 'Bobby'})
assert content.content == template.content
assert 'Bobby' in content.replaced
assert 'Bobby' in content.rendered
def test_create_content_for_notification_fails_with_missing_personalisation(sample_template_with_placeholders):