Merge lp:~diegosarmentero/ubuntu-sso-client/reset-page-not-working into lp:ubuntu-sso-client

Proposed by Diego Sarmentero
Status: Merged
Approved by: Natalia Bidart
Approved revision: 898
Merged at revision: 898
Proposed branch: lp:~diegosarmentero/ubuntu-sso-client/reset-page-not-working
Merge into: lp:ubuntu-sso-client
Diff against target: 29 lines (+11/-1)
2 files modified
ubuntu_sso/qt/tests/test_ubuntu_sso_wizard.py (+10/-0)
ubuntu_sso/qt/ubuntu_sso_wizard.py (+1/-1)
To merge this branch: bzr merge lp:~diegosarmentero/ubuntu-sso-client/reset-page-not-working
Reviewer Review Type Date Requested Status
Natalia Bidart (community) Approve
Roberto Alsina (community) Approve
Review via email: mp+95905@code.launchpad.net

Commit message

- Changed the name of the function assigned to the lambda that is called on passwordChanged signal from reset_password_page (LP: #945080).

Description of the change

Start with --login_only, select the option to reset the password, enter a valid token in the Reset Password Page and press the "reset" button, that should take you to the current user sign in page again.

To post a comment you must log in.
Revision history for this message
Roberto Alsina (ralsina) wrote :

+1 but please change sing_in to sign_in

review: Approve
898. By Diego Sarmentero

fixing typo

Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Loosk good, and works as expected.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntu_sso/qt/tests/test_ubuntu_sso_wizard.py'
2--- ubuntu_sso/qt/tests/test_ubuntu_sso_wizard.py 2012-03-01 18:03:54 +0000
3+++ ubuntu_sso/qt/tests/test_ubuntu_sso_wizard.py 2012-03-05 14:40:21 +0000
4@@ -136,3 +136,13 @@
5 # We do +1 because a hide action is executed on the wizard init.
6 self.assertEqual(self.ui.overlay.hide_counter,
7 len(self.ui._pages) + 1)
8+
9+ def test_go_back_to_current_user_sign_in(self):
10+ """Move the wizard back to the current user sign in page."""
11+ self.patch(self.ui, '_go_back_to_page', self._set_called)
12+ self.ui._next_id = self.ui.current_user_page_id
13+ self.ui.next()
14+ self.ui._move_to_reset_password_page()
15+ self.ui.reset_password.passwordChanged.emit('')
16+ expected = ((self.ui.current_user,), {})
17+ self.assertEqual(expected, self._called)
18
19=== modified file 'ubuntu_sso/qt/ubuntu_sso_wizard.py'
20--- ubuntu_sso/qt/ubuntu_sso_wizard.py 2012-03-01 18:03:54 +0000
21+++ ubuntu_sso/qt/ubuntu_sso_wizard.py 2012-03-05 14:40:21 +0000
22@@ -107,7 +107,7 @@
23 self.addPage(self.forgotten)
24
25 self.reset_password = ResetPasswordPage(**kwargs)
26- back = lambda *a: self._go_back_to_current_page(self.current_user)
27+ back = lambda *a: self._go_back_to_page(self.current_user)
28 self.reset_password.passwordChanged.connect(back)
29 self.addPage(self.reset_password)
30

Subscribers

People subscribed via source and target branches