mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-15 07:18:09 -04: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
|
||||
|
||||
@@ -615,6 +615,7 @@ def test_create_a_template_with_foreign_service_reply_to(admin_request, sample_u
|
||||
[('template address', 'service address'),
|
||||
(None, 'service address'),
|
||||
('template address', None),
|
||||
(None, None)
|
||||
])
|
||||
def test_get_template_reply_to(client, sample_service, template_default, service_default):
|
||||
auth_header = create_authorization_header()
|
||||
|
||||
Reference in New Issue
Block a user