Commit 26f2d505 authored by Arthur Lutz's avatar Arthur Lutz
Browse files

fix reset link in email notification (closes #2384159)

branch : stable
parent c94e0d85ddb1
......@@ -67,7 +67,7 @@ See you soon on %(base_url)s !
link = self._cw.get_shared_data('resetlink', pop=True)
user = fpasswd.reverse_has_fpasswd[0]
return {
'resetlink': self._cw.get_shared_data('resetlink', pop=True),
'resetlink': link,
'login': user.login,
# NOTE: it would probably be better to display the expiration date
# (with correct timezone)
from datetime import date
from logilab.common.testlib import unittest_main
from cubicweb.devtools.testlib import MAILBOX
from cubicweb.devtools.testlib import CubicWebTC
class ForgotTC(CubicWebTC):
def setup_database(self):
self.user = self.create_user(u'test_user')
self.request().create_entity('EmailAddress', address=u'',
def test_reset_password(self):
MAILBOX[:] = []
self.assertEqual(len(MAILBOX), 0)
self.assertEqual(len(MAILBOX), 1)
self.assert_('None' not in MAILBOX[0].content)
if __name__ == '__main__':
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment