Use new properties of utils Templates

We’ve added some new properties to the templates in utils that we can
use instead of doing weird things like
`WithSubjectTemplate.__str__(another_instance)`
This commit is contained in:
Chris Hill-Scott
2020-04-13 13:48:23 +01:00
parent ee25dc79e4
commit 5ddb5a75da
10 changed files with 28 additions and 57 deletions

View File

@@ -172,8 +172,10 @@ def test_notification_personalisation_setter_always_sets_empty_dict(input_value)
assert noti._personalisation == encryption.encrypt({})
def test_notification_subject_is_none_for_sms():
assert Notification(notification_type=SMS_TYPE).subject is None
def test_notification_subject_is_none_for_sms(sample_service):
template = create_template(service=sample_service, template_type=SMS_TYPE)
notification = create_notification(template=template)
assert notification.subject is None
@pytest.mark.parametrize('template_type', ['email', 'letter'])