mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 07:35:34 -05:00
Rewrite authentication error messages more English
This commit is contained in:
@@ -169,7 +169,7 @@ def test_authentication_returns_token_expired_when_service_uses_expired_key_and_
|
||||
headers={'Authorization': 'Bearer {}'.format(token)})
|
||||
assert response.status_code == 403
|
||||
data = json.loads(response.get_data())
|
||||
assert data['message'] == {"token": ['Invalid token: revoked']}
|
||||
assert data['message'] == {"token": ['Invalid token: API key revoked']}
|
||||
|
||||
|
||||
def test_authentication_returns_error_when_admin_client_has_no_secrets(notify_api,
|
||||
@@ -230,7 +230,7 @@ def test_authentication_returns_error_when_service_has_no_secrets(notify_api,
|
||||
headers={'Authorization': 'Bearer {}'.format(token)})
|
||||
assert response.status_code == 403
|
||||
error_message = json.loads(response.get_data())
|
||||
assert error_message['message'] == {'token': ['Invalid token: no api keys for service']}
|
||||
assert error_message['message'] == {'token': ['Invalid token: service has no API keys']}
|
||||
|
||||
|
||||
def test_should_attach_the_current_api_key_to_current_app(notify_api, sample_service, sample_api_key):
|
||||
|
||||
Reference in New Issue
Block a user