Give the job CSV a helpful filename

If you’re downloading a bunch of reports from your jobs then it’s useful to be
able to differentiate between them. This commit makes it easy to do so by naming
the file with:
- the name of the template
- when the job was created
This commit is contained in:
Chris Hill-Scott
2016-05-24 09:52:43 +01:00
parent 8a30a5bf51
commit dd25eb0fe1
3 changed files with 10 additions and 2 deletions

View File

@@ -793,6 +793,7 @@ def mock_get_job(mocker, job_data):
def _get_job(service_id, job_id):
job_data['id'] = job_id
job_data['service'] = service_id
job_data['created_at'] = str(datetime.utcnow())
return {"data": job_data}
return mocker.patch('app.job_api_client.get_job', side_effect=_get_job)