Merge lp:~ralsina/ubuntu-sso-client/lang-tested into lp:ubuntu-sso-client

Proposed by Roberto Alsina
Status: Merged
Approved by: Roberto Alsina
Approved revision: 911
Merged at revision: 908
Proposed branch: lp:~ralsina/ubuntu-sso-client/lang-tested
Merge into: lp:ubuntu-sso-client
Diff against target: 139 lines (+28/-18)
8 files modified
ubuntu_sso/qt/tests/test_current_user_sign_in_page.py (+7/-4)
ubuntu_sso/qt/tests/test_email_verification.py (+1/-1)
ubuntu_sso/qt/tests/test_forgotten_password.py (+3/-2)
ubuntu_sso/qt/tests/test_reset_password.py (+5/-3)
ubuntu_sso/qt/tests/test_setup_account.py (+8/-5)
ubuntu_sso/qt/tests/test_ssl_dialog.py (+2/-1)
ubuntu_sso/utils/runner/glib.py (+1/-1)
ubuntu_sso/utils/runner/tx.py (+1/-1)
To merge this branch: bzr merge lp:~ralsina/ubuntu-sso-client/lang-tested
Reviewer Review Type Date Requested Status
Natalia Bidart (community) Approve
dobey (community) Approve
Review via email: mp+97097@code.launchpad.net

Commit message

- Fixed tests so they work under non-ascii locales (LP: #951716).

Description of the change

It also tweaks error detection in spawners so that they work on non-english locales.

To post a comment you must log in.
Revision history for this message
dobey (dobey) :
review: Approve
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Looks good!

review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (67.2 KiB)

The attempt to merge lp:~ralsina/ubuntu-sso-client/lang-tested into lp:ubuntu-sso-client failed. Below is the output from the failed tests.

*** Running GTK test suite for ubuntu_sso ***
ubuntu_sso.xdg_base_directory.tests.test_common
  TestBaseDirectory
    test_load_config_paths_filter ... [OK]
    test_save_config_path ... [OK]
    test_xdg_cache_home_is_utf8_bytes ... [OK]
    test_xdg_config_dirs_are_bytes ... [OK]
    test_xdg_config_home_is_utf8_bytes ... [OK]
    test_xdg_data_dirs_are_bytes ... [OK]
    test_xdg_data_home_is_utf8_bytes ... [OK]
    test_xdg_home_is_utf8_bytes ... [OK]
twisted.trial.unittest
  TestCase
    runTest ... [OK]
ubuntu_sso.main.tests.test_clients
  AbstractTestCase
    test_error ... [OK]
    test_success ... [OK]
ubuntuone.devtools.testcases.dbus
  DBusTestCase
    runTest ... [OK]
ubuntu_sso.main.tests.test_clients
  ClearCredentialsTestCase
    test_error ... [OK]
    test_success ... [OK]
  CredentialsManagementProxyTestCase
    test_error ... [OK]
    test_success ... [OK]
  FindCredentialsTestCase
    test_error ... [OK]
    test_find_credentials_sync ... [OK]
    test_find_credentials_sync_error ... [OK]
    test_success ... [OK]
  GenerateCaptchaTestCase
    test_error ... [OK]
    test_success ... [OK]
  LoginEmailPasswordTestCase
    test_error ... [OK]
    test_success ... [OK]
  LoginOnlyTestCase
    test_error ... [OK]
    test_success ... [OK]
  LoginTestCase
    test_error ... [OK]
    test_error_when_setting_credentials ... [OK]
    test_not_validated ... [OK]
    test_success ... [OK]
  RegisterTestCase
    test_error ... [OK]
    test_success ... [OK]
  RegisterUse...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ubuntu_sso/qt/tests/test_current_user_sign_in_page.py'
--- ubuntu_sso/qt/tests/test_current_user_sign_in_page.py 2012-03-09 19:05:10 +0000
+++ ubuntu_sso/qt/tests/test_current_user_sign_in_page.py 2012-03-12 20:55:06 +0000
@@ -68,13 +68,16 @@
68 self.assert_title_correct(expected)68 self.assert_title_correct(expected)
69 expected = gui.LOGIN_SUBTITLE % dict(app_name=self.app_name)69 expected = gui.LOGIN_SUBTITLE % dict(app_name=self.app_name)
70 self.assert_subtitle_correct(expected)70 self.assert_subtitle_correct(expected)
71 self.assertEqual(self.ui.ui.email_label.text(), gui.EMAIL_LABEL)71 self.assertEqual(unicode(self.ui.ui.email_label.text()),
72 self.assertEqual(self.ui.ui.password_label.text(),72 gui.EMAIL_LABEL)
73 self.assertEqual(unicode(self.ui.ui.password_label.text()),
73 gui.LOGIN_PASSWORD_LABEL)74 gui.LOGIN_PASSWORD_LABEL)
74 text = gui.LINK_STYLE.format(link_url='#',75 text = gui.LINK_STYLE.format(link_url='#',
75 link_text=gui.FORGOTTEN_PASSWORD_BUTTON)76 link_text=gui.FORGOTTEN_PASSWORD_BUTTON)
76 self.assertEqual(self.ui.ui.forgot_password_label.text(), text)77 self.assertEqual(unicode(self.ui.ui.forgot_password_label.text()),
77 self.assertEqual(self.ui.ui.sign_in_button.text(), gui.SIGN_IN_BUTTON)78 text)
79 self.assertEqual(unicode(self.ui.ui.sign_in_button.text()),
80 gui.SIGN_IN_BUTTON)
7881
79 def test_connect_ui(self):82 def test_connect_ui(self):
80 """Test the connect ui method."""83 """Test the connect ui method."""
8184
=== modified file 'ubuntu_sso/qt/tests/test_email_verification.py'
--- ubuntu_sso/qt/tests/test_email_verification.py 2012-03-05 18:56:50 +0000
+++ ubuntu_sso/qt/tests/test_email_verification.py 2012-03-12 20:55:06 +0000
@@ -78,7 +78,7 @@
78 email = 'mail@example'78 email = 'mail@example'
79 self.ui.email = email79 self.ui.email = email
80 self.ui.set_titles(email)80 self.ui.set_titles(email)
81 self.assertEqual(self.ui.header.title_label.text(),81 self.assertEqual(unicode(self.ui.header.title_label.text()),
82 email_verification_page.VERIFY_EMAIL_TITLE)82 email_verification_page.VERIFY_EMAIL_TITLE)
83 expected = email_verification_page.VERIFY_EMAIL_CONTENT % {83 expected = email_verification_page.VERIFY_EMAIL_CONTENT % {
84 "app_name": self.app_name,84 "app_name": self.app_name,
8585
=== modified file 'ubuntu_sso/qt/tests/test_forgotten_password.py'
--- ubuntu_sso/qt/tests/test_forgotten_password.py 2012-03-05 20:30:57 +0000
+++ ubuntu_sso/qt/tests/test_forgotten_password.py 2012-03-12 20:55:06 +0000
@@ -75,9 +75,10 @@
75 subtitle = gui.FORGOTTEN_PASSWORD_SUBTITLE75 subtitle = gui.FORGOTTEN_PASSWORD_SUBTITLE
76 self.assert_subtitle_correct(subtitle.format(app_name=self.app_name))76 self.assert_subtitle_correct(subtitle.format(app_name=self.app_name))
7777
78 self.assertEqual(self.ui.ui.email_address_label.text(),78 self.assertEqual(unicode(self.ui.ui.email_address_label.text()),
79 gui.EMAIL_LABEL)79 gui.EMAIL_LABEL)
80 self.assertEqual(self.ui.ui.send_button.text(), gui.RESET_PASSWORD)80 self.assertEqual(unicode(self.ui.ui.send_button.text()),
81 gui.RESET_PASSWORD)
8182
82 def test_connect_ui(self):83 def test_connect_ui(self):
83 """Test the connect ui method."""84 """Test the connect ui method."""
8485
=== modified file 'ubuntu_sso/qt/tests/test_reset_password.py'
--- ubuntu_sso/qt/tests/test_reset_password.py 2012-03-05 18:56:50 +0000
+++ ubuntu_sso/qt/tests/test_reset_password.py 2012-03-12 20:55:06 +0000
@@ -75,10 +75,12 @@
75 self.addCleanup(self.ui.hide)75 self.addCleanup(self.ui.hide)
76 self.assert_title_correct(RESET_TITLE)76 self.assert_title_correct(RESET_TITLE)
77 self.assert_subtitle_correct(RESET_SUBTITLE)77 self.assert_subtitle_correct(RESET_SUBTITLE)
78 self.assertEqual(self.ui.ui.password_label.text(), PASSWORD1_ENTRY)78 self.assertEqual(unicode(self.ui.ui.password_label.text()),
79 self.assertEqual(self.ui.ui.confirm_password_label.text(),79 PASSWORD1_ENTRY)
80 self.assertEqual(unicode(self.ui.ui.confirm_password_label.text()),
80 PASSWORD2_ENTRY)81 PASSWORD2_ENTRY)
81 self.assertEqual(self.ui.ui.reset_code.text(), RESET_CODE_ENTRY)82 self.assertEqual(unicode(self.ui.ui.reset_code.text()),
83 RESET_CODE_ENTRY)
8284
83 def test_focus_changed_password_visibility(self):85 def test_focus_changed_password_visibility(self):
84 """Check visibility changes when focus_changed() is executed."""86 """Check visibility changes when focus_changed() is executed."""
8587
=== modified file 'ubuntu_sso/qt/tests/test_setup_account.py'
--- ubuntu_sso/qt/tests/test_setup_account.py 2012-03-07 18:03:28 +0000
+++ ubuntu_sso/qt/tests/test_setup_account.py 2012-03-12 20:55:06 +0000
@@ -209,12 +209,15 @@
209 self.assertFalse(self.ui.captcha_received)209 self.assertFalse(self.ui.captcha_received)
210210
211 # labels211 # labels
212 self.assertEqual(self.ui.ui.name_label.text(), gui.NAME_ENTRY)212 self.assertEqual(unicode(self.ui.ui.name_label.text()),
213 self.assertEqual(self.ui.ui.email_label.text(), gui.EMAIL)213 gui.NAME_ENTRY)
214 self.assertEqual(self.ui.ui.confirm_email_label.text(),214 self.assertEqual(unicode(self.ui.ui.email_label.text()),
215 gui.EMAIL)
216 self.assertEqual(unicode(self.ui.ui.confirm_email_label.text()),
215 gui.RETYPE_EMAIL)217 gui.RETYPE_EMAIL)
216 self.assertEqual(self.ui.ui.password_label.text(), gui.PASSWORD)218 self.assertEqual(unicode(self.ui.ui.password_label.text()),
217 self.assertEqual(self.ui.ui.confirm_password_label.text(),219 gui.PASSWORD)
220 self.assertEqual(unicode(self.ui.ui.confirm_password_label.text()),
218 gui.RETYPE_PASSWORD)221 gui.RETYPE_PASSWORD)
219222
220 # assistants223 # assistants
221224
=== modified file 'ubuntu_sso/qt/tests/test_ssl_dialog.py'
--- ubuntu_sso/qt/tests/test_ssl_dialog.py 2012-03-05 16:32:37 +0000
+++ ubuntu_sso/qt/tests/test_ssl_dialog.py 2012-03-12 20:55:06 +0000
@@ -142,7 +142,8 @@
142142
143 def test_set_expander(self):143 def test_set_expander(self):
144 """Test that the expander is correctly set."""144 """Test that the expander is correctly set."""
145 self.assertEqual(SSL_CERT_DETAILS, self.dialog.expander.text())145 self.assertEqual(SSL_CERT_DETAILS,
146 unicode(self.dialog.expander.text()))
146 self.assertNotEqual(None, self.dialog.expander.content)147 self.assertNotEqual(None, self.dialog.expander.content)
147 self.assertEqual(2, self.dialog.ui.expander_layout.indexOf(148 self.assertEqual(2, self.dialog.ui.expander_layout.indexOf(
148 self.dialog.expander))149 self.dialog.expander))
149150
=== modified file 'ubuntu_sso/utils/runner/glib.py'
--- ubuntu_sso/utils/runner/glib.py 2012-02-17 18:43:17 +0000
+++ ubuntu_sso/utils/runner/glib.py 2012-03-12 20:55:06 +0000
@@ -27,7 +27,7 @@
27logger = setup_logging("ubuntu_sso.utils.runner.glib")27logger = setup_logging("ubuntu_sso.utils.runner.glib")
2828
2929
30NO_SUCH_FILE_OR_DIR = 'No such file or directory'30NO_SUCH_FILE_OR_DIR = '[Errno 2]'
3131
3232
33def spawn_program(args, reply_handler, error_handler):33def spawn_program(args, reply_handler, error_handler):
3434
=== modified file 'ubuntu_sso/utils/runner/tx.py'
--- ubuntu_sso/utils/runner/tx.py 2012-02-17 19:13:15 +0000
+++ ubuntu_sso/utils/runner/tx.py 2012-03-12 20:55:06 +0000
@@ -26,7 +26,7 @@
2626
27logger = setup_logging("ubuntu_sso.utils.runner.tx")27logger = setup_logging("ubuntu_sso.utils.runner.tx")
2828
29NO_SUCH_FILE_OR_DIR = 'OSError: [Errno 2] No such file or directory'29NO_SUCH_FILE_OR_DIR = 'OSError: [Errno 2]'
3030
3131
32EXE_EXT = ''32EXE_EXT = ''

Subscribers

People subscribed via source and target branches