Fix up issues caused by merge

- statistics now on job_json
- removed test that validates we handle the case where job has no statistics key - never happens
This commit is contained in:
Martyn Inglis
2016-09-05 14:45:34 +01:00
parent 1ad2665bfe
commit 2f56643e3a
3 changed files with 1 additions and 46 deletions

View File

@@ -71,16 +71,6 @@ class JobApiClient(BaseAPIClient):
data = _attach_current_user(data)
job = self.post(url='/service/{}/job'.format(service_id), data=data)
stats = self.__convert_statistics(job)
job['data']['notifications_sent'] = stats['delivered'] + stats['failed']
job['data']['notifications_delivered'] = stats['delivered']
job['data']['notifications_failed'] = stats['failed']
if scheduled_for:
data.update({'scheduled_for': scheduled_for})
data = _attach_current_user(data)
job = self.post(url='/service/{}/job'.format(service_id), data=data)
stats = self.__convert_statistics(job['data'])
job['data']['notifications_sent'] = stats['delivered'] + stats['failed']
job['data']['notifications_delivered'] = stats['delivered']