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
1=== modified file 'ubuntu_sso/gtk/gui.py'
2--- ubuntu_sso/gtk/gui.py 2011-03-16 01:36:07 +0000
3+++ ubuntu_sso/gtk/gui.py 2011-03-30 17:34:24 +0000
4@@ -526,6 +526,7 @@
5 """Ask for a new captcha; update the ui to reflect the fact."""
6 logger.info('Calling generate_captcha with filename path at %r',
7 self._captcha_filename)
8+ self.warning_label.set_text('')
9 self.backend.generate_captcha(self.app_name, self._captcha_filename,
10 reply_handler=NO_OP, error_handler=NO_OP)
11 self._set_captcha_loading()
12
13=== modified file 'ubuntu_sso/gtk/tests/test_gui.py'
14--- ubuntu_sso/gtk/tests/test_gui.py 2011-03-16 01:36:07 +0000
15+++ ubuntu_sso/gtk/tests/test_gui.py 2011-03-30 17:34:24 +0000
16@@ -880,6 +880,12 @@
17 self.ui.CAPTCHA_LOAD_ERROR)
18 self.assertEqual(self._called, ((), {}))
19
20+ def test_captcha_success_after_error(self):
21+ """When captcha was retrieved after error, the warning is removed."""
22+ self.ui.on_captcha_generation_error(APP_NAME, error=self.error)
23+ self.ui.on_captcha_generated(app_name=APP_NAME, captcha_id=CAPTCHA_ID)
24+ self.assertEqual(self.ui.warning_label.get_text(), '')
25+
26
27 class NoTermsAndConditionsTestCase(UbuntuSSOClientTestCase):
28 """Test suite for the user registration (with no t&c link)."""

Subscribers

People subscribed via source and target branches