Removed update_job endpoint because it is not being used

This commit is contained in:
Rebecca Law
2016-04-27 09:46:45 +01:00
parent 18a2408faa
commit 3f7bae3428
3 changed files with 2 additions and 45 deletions

View File

@@ -180,35 +180,6 @@ def test_create_job_returns_404_if_missing_service(notify_api, sample_template,
assert resp_json['message'] == 'No result found'
def test_get_update_job(notify_api, sample_job):
assert sample_job.status == 'pending'
job_id = str(sample_job.id)
service_id = str(sample_job.service.id)
update_data = {
'status': 'in progress'
}
with notify_api.test_request_context():
with notify_api.test_client() as client:
path = '/service/{}/job/{}'.format(service_id, job_id)
auth_header = create_authorization_header(
service_id=service_id,
path=path,
method='POST',
request_body=json.dumps(update_data))
headers = [('Content-Type', 'application/json'), auth_header]
response = client.post(path, headers=headers, data=json.dumps(update_data))
resp_json = json.loads(response.get_data(as_text=True))
assert response.status_code == 200
assert resp_json['data']['status'] == 'in progress'
def _setup_jobs(notify_db, notify_db_session, template, number_of_jobs=5):
for i in range(number_of_jobs):
create_job(