mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-22 16:31:15 -05:00
Fix for git commit review.
This commit is contained in:
@@ -50,7 +50,6 @@ def test_get_job_with_invalid_job_id_returns404(notify_api, sample_template):
|
||||
response = client.get(path, headers=[auth_header])
|
||||
assert response.status_code == 404
|
||||
resp_json = json.loads(response.get_data(as_text=True))
|
||||
print(resp_json)
|
||||
assert resp_json['result'] == 'error'
|
||||
assert resp_json['message'] == 'No result found'
|
||||
|
||||
@@ -218,7 +217,6 @@ def test_get_update_job(notify_api, sample_job):
|
||||
|
||||
def _setup_jobs(notify_db, notify_db_session, template, number_of_jobs=5):
|
||||
for i in range(number_of_jobs):
|
||||
print(i)
|
||||
create_job(
|
||||
notify_db,
|
||||
notify_db_session,
|
||||
|
||||
@@ -29,7 +29,8 @@ def test_get_user_list(notify_api, notify_db, notify_db_session, sample_user, sa
|
||||
"logged_in_at": None,
|
||||
"state": "active",
|
||||
"failed_login_count": 0,
|
||||
"permissions": {}
|
||||
"permissions": {
|
||||
str(sample_admin_service_id): ['manage_service', 'send_messages', 'manage_api_keys']}
|
||||
}
|
||||
print(json_resp['data'])
|
||||
assert expected in json_resp['data']
|
||||
@@ -58,7 +59,8 @@ def test_get_user(notify_api, notify_db, notify_db_session, sample_user, sample_
|
||||
"logged_in_at": None,
|
||||
"state": "active",
|
||||
"failed_login_count": 0,
|
||||
"permissions": {}
|
||||
"permissions": {
|
||||
str(sample_admin_service_id): ['manage_service', 'send_messages', 'manage_api_keys']}
|
||||
}
|
||||
assert json_resp['data'] == expected
|
||||
|
||||
@@ -197,7 +199,8 @@ def test_put_user(notify_api, notify_db, notify_db_session, sample_user, sample_
|
||||
"logged_in_at": None,
|
||||
"state": "active",
|
||||
"failed_login_count": 0,
|
||||
"permissions": {}
|
||||
"permissions": {
|
||||
str(sample_admin_service_id): ['manage_service', 'send_messages', 'manage_api_keys']}
|
||||
}
|
||||
assert json_resp['data'] == expected
|
||||
assert json_resp['data']['email_address'] == new_email
|
||||
@@ -295,7 +298,8 @@ def test_get_user_by_email(notify_api, notify_db, notify_db_session, sample_user
|
||||
"logged_in_at": None,
|
||||
"state": "active",
|
||||
"failed_login_count": 0,
|
||||
"permissions": {}
|
||||
"permissions": {
|
||||
str(sample_admin_service_id): ['manage_service', 'send_messages', 'manage_api_keys']}
|
||||
}
|
||||
|
||||
assert json_resp['data'] == expected
|
||||
|
||||
@@ -358,7 +358,6 @@ def test_send_user_sms_code(notify_api,
|
||||
url_for('user.send_user_sms_code', user_id=sample_sms_code.user.id),
|
||||
data=data,
|
||||
headers=[('Content-Type', 'application/json'), auth_header])
|
||||
print(resp.get_data(as_text=True))
|
||||
assert resp.status_code == 204
|
||||
app.celery.tasks.send_sms_code.apply_async.assert_called_once_with(['something_encrypted'],
|
||||
queue='sms-code')
|
||||
@@ -427,7 +426,6 @@ def test_send_user_email_code(notify_api,
|
||||
url_for('user.send_user_email_code', user_id=sample_email_code.user.id),
|
||||
data=data,
|
||||
headers=[('Content-Type', 'application/json'), auth_header])
|
||||
print(resp.get_data(as_text=True))
|
||||
assert resp.status_code == 204
|
||||
app.celery.tasks.send_email_code.apply_async.assert_called_once_with(['something_encrypted'],
|
||||
queue='email-code')
|
||||
|
||||
Reference in New Issue
Block a user