Pass DVLA organisation ID through to Template

So that we know which organisation ID to spit out in the file.
This commit is contained in:
Chris Hill-Scott
2017-04-20 12:06:51 +01:00
parent d514d99a67
commit 5720f056ee
2 changed files with 3 additions and 1 deletions

View File

@@ -321,7 +321,8 @@ def create_dvla_file_contents(job_id):
notification.template.__dict__,
notification.personalisation,
notification_reference=notification.reference,
contact_block=notification.service.letter_contact_block
contact_block=notification.service.letter_contact_block,
org_id=notification.service.dvla_organisation.id,
))
for notification in dao_get_all_notifications_for_job(job_id)
)

View File

@@ -1038,6 +1038,7 @@ def test_create_dvla_file_contents(sample_letter_template, mocker):
assert calls[1][1]['contact_block'] == 'London,\nSW1A 1AA'
assert calls[0][1]['notification_reference'] == '1'
assert calls[1][1]['notification_reference'] == '2'
assert calls[1][1]['org_id'] == '001'
@freeze_time("2017-03-23 11:09:00.061258")