- simplify if statement

- use the template.get_reply_to_text() in send_notification, it's already using the right thing.
This commit is contained in:
Rebecca Law
2018-01-08 16:54:19 +00:00
parent d6683d9630
commit a052020f84
4 changed files with 4 additions and 15 deletions

View File

@@ -1256,10 +1256,9 @@ def test_build_dvla_file_retries_if_s3_err(sample_letter_template, mocker):
def test_create_dvla_file_contents(notify_db_session, mocker):
service = create_service(service_permissions=SERVICE_PERMISSION_TYPES)
create_letter_contact(service=service, contact_block='London,\nNW1A 1AA')
letter_template = create_template(service=service, template_type=LETTER_TYPE)
job = create_job(template=letter_template, notification_count=2)
create_notification(template=job.template, job=job, reference=1, reply_to_text=service.get_default_letter_contact())
create_notification(template=job.template, job=job, reference=1, reply_to_text='London,\nNW1A 1AA')
create_notification(template=job.template, job=job, reference=2, reply_to_text='Not the default address')
mocked_letter_template = mocker.patch("app.celery.tasks.LetterDVLATemplate")
mocked_letter_template_instance = mocked_letter_template.return_value