diff --git a/app/accept_invite/rest.py b/app/accept_invite/rest.py index a6ac0773b..0485fc58a 100644 --- a/app/accept_invite/rest.py +++ b/app/accept_invite/rest.py @@ -35,8 +35,8 @@ def validate_invitation_token(invitation_type, token): max_age_seconds) except SignatureExpired: errors = {'invitation': - ['Your invitation to GOV.UK Notify has expired. ' - 'Please ask the person that invited you to send you another one']} + 'Your invitation to GOV.UK Notify has expired. ' + 'Please ask the person that invited you to send you another one'} raise InvalidRequest(errors, status_code=400) except BadData: errors = {'invitation': 'Something’s wrong with this link. Make sure you’ve copied the whole thing.'} diff --git a/tests/app/accept_invite/test_accept_invite_rest.py b/tests/app/accept_invite/test_accept_invite_rest.py index f0c806473..a351eb4de 100644 --- a/tests/app/accept_invite/test_accept_invite_rest.py +++ b/tests/app/accept_invite/test_accept_invite_rest.py @@ -19,9 +19,9 @@ def test_validate_invitation_token_for_expired_token_returns_400(client, invitat assert response.status_code == 400 json_resp = json.loads(response.get_data(as_text=True)) assert json_resp['result'] == 'error' - assert json_resp['message'] == {'invitation': [ - 'Your invitation to GOV.UK Notify has expired. ' - 'Please ask the person that invited you to send you another one']} + assert json_resp['message'] == { + 'invitation': 'Your invitation to GOV.UK Notify has expired. ' + 'Please ask the person that invited you to send you another one'} @pytest.mark.parametrize('invitation_type', ['service', 'organisation'])