Merge lp:~nataliabidart/ubuntu-sso-client/clean-captcha-error-1-2 into lp:ubuntu-sso-client/stable-1-2

Proposed by Natalia Bidart
Status: Merged
Approved by: Natalia Bidart
Approved revision: 685
Merged at revision: 685
Proposed branch: lp:~nataliabidart/ubuntu-sso-client/clean-captcha-error-1-2
Merge into: lp:ubuntu-sso-client/stable-1-2
Diff against target: 28 lines (+7/-0)
2 files modified
ubuntu_sso/gtk/gui.py (+1/-0)
ubuntu_sso/gtk/tests/test_gui.py (+6/-0)
To merge this branch: bzr merge lp:~nataliabidart/ubuntu-sso-client/clean-captcha-error-1-2
Reviewer Review Type Date Requested Status
Manuel de la Peña (community) Approve
Eric Casteleijn (community) Approve
Ubuntu One hackers Pending
Review via email: mp+55605@code.launchpad.net

Commit message

- Captcha load warning is removed when retry is successful (LP: #703115).

To post a comment you must log in.
Revision history for this message
Eric Casteleijn (thisfred) wrote :

looks good

review: Approve
Revision history for this message
Eric Casteleijn (thisfred) :
review: Approve
Revision history for this message
Manuel de la Peña (mandel) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ubuntu_sso/gtk/gui.py'
--- ubuntu_sso/gtk/gui.py 2011-03-16 01:36:07 +0000
+++ ubuntu_sso/gtk/gui.py 2011-03-30 17:34:24 +0000
@@ -526,6 +526,7 @@
526 """Ask for a new captcha; update the ui to reflect the fact."""526 """Ask for a new captcha; update the ui to reflect the fact."""
527 logger.info('Calling generate_captcha with filename path at %r',527 logger.info('Calling generate_captcha with filename path at %r',
528 self._captcha_filename)528 self._captcha_filename)
529 self.warning_label.set_text('')
529 self.backend.generate_captcha(self.app_name, self._captcha_filename,530 self.backend.generate_captcha(self.app_name, self._captcha_filename,
530 reply_handler=NO_OP, error_handler=NO_OP)531 reply_handler=NO_OP, error_handler=NO_OP)
531 self._set_captcha_loading()532 self._set_captcha_loading()
532533
=== modified file 'ubuntu_sso/gtk/tests/test_gui.py'
--- ubuntu_sso/gtk/tests/test_gui.py 2011-03-16 01:36:07 +0000
+++ ubuntu_sso/gtk/tests/test_gui.py 2011-03-30 17:34:24 +0000
@@ -880,6 +880,12 @@
880 self.ui.CAPTCHA_LOAD_ERROR)880 self.ui.CAPTCHA_LOAD_ERROR)
881 self.assertEqual(self._called, ((), {}))881 self.assertEqual(self._called, ((), {}))
882882
883 def test_captcha_success_after_error(self):
884 """When captcha was retrieved after error, the warning is removed."""
885 self.ui.on_captcha_generation_error(APP_NAME, error=self.error)
886 self.ui.on_captcha_generated(app_name=APP_NAME, captcha_id=CAPTCHA_ID)
887 self.assertEqual(self.ui.warning_label.get_text(), '')
888
883889
884class NoTermsAndConditionsTestCase(UbuntuSSOClientTestCase):890class NoTermsAndConditionsTestCase(UbuntuSSOClientTestCase):
885 """Test suite for the user registration (with no t&c link)."""891 """Test suite for the user registration (with no t&c link)."""

Subscribers

People subscribed via source and target branches