Pass letter logo filename to template preview

We now pass through `filename` to the Template Preview `/preview.<filetype>'
endpoint in addition to the `dvla_org_id`. Template Preview will be
changed to only use `filename`, and once this has been done, we can change
the code to only pass through `dvla_org_id` instead of passing through
both pieces of information.
This commit is contained in:
Katie Smith
2018-10-17 15:17:11 +01:00
parent c29dfecaa4
commit 0362265cb6
3 changed files with 6 additions and 1 deletions

View File

@@ -49,7 +49,9 @@ def test_from_database_object_makes_request(
):
resp = Mock(content='a', status_code='b', headers={'c': 'd'})
request_mock = mocker.patch('app.template_previews.requests.post', return_value=resp)
mocker.patch('app.template_previews.current_service', dvla_organisation='123')
mocker.patch('app.template_previews.current_service',
dvla_organisation='123',
letter_logo_filename='hm-government')
template = mock_get_service_letter_template('123', '456')['data']
ret = partial_call(template=template)
@@ -62,6 +64,7 @@ def test_from_database_object_makes_request(
'letter_contact_block': None,
'template': template,
'values': None,
'filename': 'hm-government',
'dvla_org_id': '123',
}
headers = {'Authorization': 'Token my-secret-key'}