mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-19 14:08:47 -04:00
Removed update_job endpoint because it is not being used
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user