Fix bug where job url type was constructed for letter on uploads page

This commit is contained in:
Pea Tyczynska
2020-02-04 14:19:07 +00:00
parent 18523587a6
commit 46292949cd
3 changed files with 11 additions and 3 deletions

View File

@@ -42,6 +42,14 @@ def test_get_upload_hub_page(
'main.upload_letter', service_id=SERVICE_ONE_ID
)
assert page.findAll(
'a', {'class': 'file-list-filename'}
)[0].attrs['href'] == '/services/{}/jobs/job_id_1'.format(SERVICE_ONE_ID)
assert page.findAll(
'a', {'class': 'file-list-filename'}
)[1].attrs['href'] == '/services/{}/notification/letter_id_1'.format(SERVICE_ONE_ID)
def test_get_upload_letter(client_request):
page = client_request.get('main.upload_letter', service_id=SERVICE_ONE_ID)

View File

@@ -1733,8 +1733,8 @@ def mock_get_uploads(mocker, api_user_active):
'created_at': '2016-01-01 11:09:00.061258',
'statistics': [{'count': 8, 'status': 'delivered'}, {'count': 2, 'status': 'temporary-failure'}],
'upload_type': 'job'},
{'id': 'job_id_1',
'original_file_name': 'some.csv',
{'id': 'letter_id_1',
'original_file_name': 'some.pdf',
'notification_count': 1,
'created_at': '2016-01-01 11:09:00.061258',
'statistics': [{'count': 1, 'status': 'delivered'}],