diff --git a/flask_security/core.py b/flask_security/core.py index 60d6530..b30af10 100644 --- a/flask_security/core.py +++ b/flask_security/core.py @@ -157,10 +157,8 @@ def _get_login_manager(app): lm.login_view = '%s.login' % cv('BLUEPRINT_NAME', app=app) lm.user_loader(_user_loader) lm.token_loader(_token_loader) - lm.login_message = cv('MSG_LOGIN', app=app) - lm.login_message_category = 'info' - lm.needs_refresh_message = cv('MSG_REFRESH', app=app) - lm.needs_refresh_message_category = 'info' + lm.login_message, lm.login_message_category = cv('MSG_LOGIN', app=app) + lm.needs_refresh_message, lm.needs_refresh_message_category = cv('MSG_REFRESH', app=app) lm.init_app(app) return lm diff --git a/tests/functional_tests.py b/tests/functional_tests.py index 49e9be6..8614ef0 100644 --- a/tests/functional_tests.py +++ b/tests/functional_tests.py @@ -60,7 +60,7 @@ class DefaultSecurityTests(SecurityTest): def test_unauthorized_access(self): r = self._get('/profile', follow_redirects=True) - self.assertIn('Please log in to access this page', r.data) + self.assertIn('
  • Please log in to access this page.
  • ', r.data) def test_authorized_access(self): self.authenticate()