Return empty stats list for job creation

This commit is contained in:
Martyn Inglis
2016-08-31 12:12:09 +01:00
parent bcfa83de79
commit 57267a36f2
2 changed files with 6 additions and 1 deletions

View File

@@ -140,6 +140,7 @@ def test_create_unscheduled_job(notify_api, sample_template, mocker, fake_uuid):
assert resp_json['data']['id'] == fake_uuid
assert resp_json['data']['status'] == 'pending'
assert resp_json['data']['statistics'] == []
assert not resp_json['data']['scheduled_for']
assert resp_json['data']['job_status'] == 'pending'
assert resp_json['data']['template'] == str(sample_template.id)
@@ -176,6 +177,7 @@ def test_create_scheduled_job(notify_api, sample_template, mocker, fake_uuid):
resp_json = json.loads(response.get_data(as_text=True))
assert resp_json['data']['id'] == fake_uuid
assert resp_json['data']['statistics'] == []
assert resp_json['data']['status'] == 'pending'
assert resp_json['data']['scheduled_for'] == datetime(2016, 1, 2, 11, 59, 0,
tzinfo=pytz.UTC).isoformat()