mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-11 17:38:02 -04:00
Update send_to_providers and create_dvla_file_contents_for_notifications to use notification.reply_to_text.
The next thing to do is to stop updating the notification to sender mapping tables.
This commit is contained in:
@@ -1107,8 +1107,8 @@ def test_create_dvla_file_contents(notify_db_session, mocker):
|
||||
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)
|
||||
create_notification(template=job.template, job=job, reference=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=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
|
||||
mocked_letter_template_instance.__str__.return_value = "dvla|string"
|
||||
@@ -1123,7 +1123,8 @@ def test_create_dvla_file_contents(notify_db_session, mocker):
|
||||
assert not calls[0][0][1]
|
||||
assert not calls[1][0][1]
|
||||
# Named arguments
|
||||
assert calls[1][1]['contact_block'] == 'London,\nNW1A 1AA'
|
||||
assert calls[0][1]['contact_block'] == 'London,\nNW1A 1AA'
|
||||
assert calls[1][1]['contact_block'] == 'Not the default address'
|
||||
assert calls[0][1]['notification_reference'] == '1'
|
||||
assert calls[1][1]['notification_reference'] == '2'
|
||||
assert calls[1][1]['org_id'] == '001'
|
||||
|
||||
Reference in New Issue
Block a user