Skip to content

Commit

Permalink
Fix test and style
Browse files Browse the repository at this point in the history
  • Loading branch information
Rebecca Law committed Dec 7, 2016
1 parent f946b02 commit eedc2fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions app/accept_invite/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ def get_invited_user_by_token(token):
max_age_seconds)
except SignatureExpired:
errors = {'invitation':
['This invitation has expired please contact the person that invited you to invite you again']}
print(errors)
['This invitation has expired please contact the person that invited you to invite you again']}
raise InvalidRequest(errors, status_code=400)

invited_user = get_invited_user_by_id(invited_user_id)
Expand Down
4 changes: 2 additions & 2 deletions tests/app/accept_invite/test_accept_invite_rest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import uuid

import pytest
from flask import json
from freezegun import freeze_time
from notifications_utils.url_safe_token import generate_token
Expand All @@ -20,7 +19,8 @@ def test_accept_invite_for_expired_token_returns_400(notify_api, sample_invited_
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': ['Invitation has expired']}
assert json_resp['message'] == {'invitation': [
'This invitation has expired please contact the person that invited you to invite you again']}


def test_accept_invite_returns_200_when_token_valid(notify_api, sample_invited_user):
Expand Down

0 comments on commit eedc2fb

Please sign in to comment.