mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 09:26:08 -05:00
- 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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user