From b4d1a7c9218fefa6931a394c771bd44a73b1ceb5 Mon Sep 17 00:00:00 2001 From: Jameson Date: Thu, 23 Jan 2014 23:33:11 +0000 Subject: [PATCH] update to make test run red --- flask_security/utils.py | 8 ++++---- tests/configured_tests.py | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/flask_security/utils.py b/flask_security/utils.py index ec85ab5..336bb0d 100644 --- a/flask_security/utils.py +++ b/flask_security/utils.py @@ -315,10 +315,10 @@ def get_token_status(token, serializer, max_age=None): expired = True except BadSignature: invalid = True - except TypeError: - invalid = True - except ValueError: - invalid = True +# except TypeError: +# invalid = True +# except ValueError: +# invalid = True if data: user = _datastore.find_user(id=data[0]) diff --git a/tests/configured_tests.py b/tests/configured_tests.py index 0324ecf..cc59011 100644 --- a/tests/configured_tests.py +++ b/tests/configured_tests.py @@ -432,7 +432,8 @@ class RecoverableTests(SecurityTest): 'password_confirm': 'newpassword' }, follow_redirects=True) - self.assertIn(self.get_message('INVALID_RESET_PASSWORD_TOKEN'), r.data) + m = self.get_message('INVALID_RESET_PASSWORD_TOKEN') + self.assertIn(m.encode('utf-8'), r.data) class ExpiredResetPasswordTest(SecurityTest):