Merge pull request #793 from alphagov/better-expired-error

Give a more helpful error when token has expired
This commit is contained in:
Chris Hill-Scott
2017-01-17 14:48:57 +00:00
committed by GitHub
2 changed files with 4 additions and 2 deletions

View File

@@ -320,7 +320,9 @@ def test_should_return_403_when_token_is_expired(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: expired']}
assert error_message['message'] == {'token': [
'Invalid token: expired, check that your system clock is accurate'
]}
def __create_get_token(service_id):