Rewrite authentication error messages more English

This commit is contained in:
Chris Hill-Scott
2016-09-16 08:45:48 +01:00
parent 1ce91997e8
commit d44a0b72bb
2 changed files with 4 additions and 4 deletions

View File

@@ -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):