Merge lp:~diegosarmentero/ubuntuone-windows-installer/reset-fails into lp:ubuntuone-windows-installer

Proposed by Diego Sarmentero
Status: Merged
Approved by: Natalia Bidart
Approved revision: 66
Merged at revision: 67
Proposed branch: lp:~diegosarmentero/ubuntuone-windows-installer/reset-fails
Merge into: lp:ubuntuone-windows-installer
Diff against target: 69 lines (+40/-2)
2 files modified
ubuntuone_installer/gui/qt/gui.py (+4/-2)
ubuntuone_installer/gui/qt/tests/test_gui.py (+36/-0)
To merge this branch: bzr merge lp:~diegosarmentero/ubuntuone-windows-installer/reset-fails
Reviewer Review Type Date Requested Status
Natalia Bidart (community) Approve
Roberto Alsina (community) Approve
Review via email: mp+75599@code.launchpad.net

Commit message

Fixed: Errors when resetting the password are not handled

Description of the change

Fixed: Errors when resetting the password are not handled

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

+1 nice!

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

oh, lint issues:

ubuntuone_installer/gui/qt/tests/test_gui.py:
    161: [E1101, MainWindowTestCase.test_setup_account_controller_params] Instance of 'SetUpAccountController' has no 'args' member
    163: [E1101, MainWindowTestCase.test_setup_account_controller_params] Instance of 'SetUpAccountController' has no 'args' member
    168: [E1101, MainWindowTestCase.test_current_user_controller_params] Instance of 'CurrentUserController' has no 'args' member
    170: [E1101, MainWindowTestCase.test_current_user_controller_params] Instance of 'CurrentUserController' has no 'args' member
    173: [E1101, MainWindowTestCase.test_current_user_controller_params] Instance of 'CurrentUserController' has no 'args' member
    176: [E1101, MainWindowTestCase.test_current_user_controller_params] Instance of 'SetUpAccountController' has no 'args' member
    181: [E1101, MainWindowTestCase.test_forgotten_password_controller_params] Instance of 'ForgottenPasswordController' has no 'args' member
    183: [E1101, MainWindowTestCase.test_forgotten_password_controller_params] Instance of 'SetUpAccountController' has no 'args' member
    188: [E1101, MainWindowTestCase.test_reset_password_controller_params] Instance of 'ResetPasswordController' has no 'args' member
    190: [E1101, MainWindowTestCase.test_reset_password_controller_params] Instance of 'SetUpAccountController' has no 'args' member

review: Needs Fixing
66. By Diego Sarmentero

Fixed lint issues.

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

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntuone_installer/gui/qt/gui.py'
2--- ubuntuone_installer/gui/qt/gui.py 2011-09-15 18:00:28 +0000
3+++ ubuntuone_installer/gui/qt/gui.py 2011-09-15 18:41:42 +0000
4@@ -345,14 +345,16 @@
5 self.error_controller = ErrorController()
6 self.error = ErrorPage(Ui_ErrorPage(), self.error_controller)
7
8- self.forgotten_pwd_controller = ForgottenPasswordController()
9+ self.forgotten_pwd_controller = ForgottenPasswordController(
10+ message_box=self)
11 self.forgotten = ForgottenPasswordPage(Ui_ForgottenPasswordPage(),
12 self.forgotten_pwd_controller,
13 parent=self)
14 self.forgotten.ui.send_button.clicked.connect(
15 self.overlay.show)
16
17- self.reset_password_controller = ResetPasswordController()
18+ self.reset_password_controller = ResetPasswordController(
19+ message_box=self)
20 self.reset_password = ResetPasswordPage(Ui_ResetPasswordPage(),
21 self.reset_password_controller,
22 parent=self)
23
24=== modified file 'ubuntuone_installer/gui/qt/tests/test_gui.py'
25--- ubuntuone_installer/gui/qt/tests/test_gui.py 2011-09-15 18:00:28 +0000
26+++ ubuntuone_installer/gui/qt/tests/test_gui.py 2011-09-15 18:41:42 +0000
27@@ -155,6 +155,42 @@
28 setup_page = self.ui.page(self.ui.setup_account_page_id)
29 setup_page.initializePage()
30
31+ # pylint: disable=E1101
32+ def test_setup_account_controller_params(self):
33+ """Test with SetupAccountController params."""
34+ win = gui.MainWindow()
35+ val = win.setup_controller.args[1].pop('message_box', None)
36+ self.assertEqual(val, win)
37+ self.assertEqual(win.setup_controller.args[0], ())
38+
39+ def test_current_user_controller_params(self):
40+ """Test with CurrentUserController params."""
41+ win = gui.MainWindow()
42+ val = win.current_user_controller.args[1].pop('message_box', None)
43+ self.assertEqual(val, win)
44+ val = win.current_user_controller.args[1].pop('title', '')
45+ title = gui.TITLE_STYLE % gui.SIGN_IN
46+ self.assertEqual(val, title)
47+ val = win.current_user_controller.args[1].pop('subtitle', '')
48+ subtitle = gui.SIGN_IN_SUBTITLE
49+ self.assertEqual(val, subtitle)
50+ self.assertEqual(win.setup_controller.args[0], ())
51+
52+ def test_forgotten_password_controller_params(self):
53+ """Test with ForgottenPasswordController params."""
54+ win = gui.MainWindow()
55+ val = win.forgotten_pwd_controller.args[1].pop('message_box', None)
56+ self.assertEqual(val, win)
57+ self.assertEqual(win.setup_controller.args[0], ())
58+
59+ def test_reset_password_controller_params(self):
60+ """Test with ResetPasswordController params."""
61+ win = gui.MainWindow()
62+ val = win.reset_password_controller.args[1].pop('message_box', None)
63+ self.assertEqual(val, win)
64+ self.assertEqual(win.setup_controller.args[0], ())
65+ # pylint: enable=E1101
66+
67 def test_wizard_init(self):
68 """Check the Wizard flags regarding to the context help button."""
69 flag = int(self.ui.windowFlags() &

Subscribers

People subscribed via source and target branches