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

Proposed by Roberto Alsina on 2012-03-12
Status: Merged
Approved by: Roberto Alsina on 2012-03-13
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 Approve on 2012-03-13
dobey (community) 2012-03-12 Approve on 2012-03-12
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.
dobey (dobey) :
review: Approve
Natalia Bidart (nataliabidart) wrote :

Looks good!

review: Approve
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
1=== modified file 'ubuntu_sso/qt/tests/test_current_user_sign_in_page.py'
2--- ubuntu_sso/qt/tests/test_current_user_sign_in_page.py 2012-03-09 19:05:10 +0000
3+++ ubuntu_sso/qt/tests/test_current_user_sign_in_page.py 2012-03-12 20:55:06 +0000
4@@ -68,13 +68,16 @@
5 self.assert_title_correct(expected)
6 expected = gui.LOGIN_SUBTITLE % dict(app_name=self.app_name)
7 self.assert_subtitle_correct(expected)
8- self.assertEqual(self.ui.ui.email_label.text(), gui.EMAIL_LABEL)
9- self.assertEqual(self.ui.ui.password_label.text(),
10+ self.assertEqual(unicode(self.ui.ui.email_label.text()),
11+ gui.EMAIL_LABEL)
12+ self.assertEqual(unicode(self.ui.ui.password_label.text()),
13 gui.LOGIN_PASSWORD_LABEL)
14 text = gui.LINK_STYLE.format(link_url='#',
15 link_text=gui.FORGOTTEN_PASSWORD_BUTTON)
16- self.assertEqual(self.ui.ui.forgot_password_label.text(), text)
17- self.assertEqual(self.ui.ui.sign_in_button.text(), gui.SIGN_IN_BUTTON)
18+ self.assertEqual(unicode(self.ui.ui.forgot_password_label.text()),
19+ text)
20+ self.assertEqual(unicode(self.ui.ui.sign_in_button.text()),
21+ gui.SIGN_IN_BUTTON)
22
23 def test_connect_ui(self):
24 """Test the connect ui method."""
25
26=== modified file 'ubuntu_sso/qt/tests/test_email_verification.py'
27--- ubuntu_sso/qt/tests/test_email_verification.py 2012-03-05 18:56:50 +0000
28+++ ubuntu_sso/qt/tests/test_email_verification.py 2012-03-12 20:55:06 +0000
29@@ -78,7 +78,7 @@
30 email = 'mail@example'
31 self.ui.email = email
32 self.ui.set_titles(email)
33- self.assertEqual(self.ui.header.title_label.text(),
34+ self.assertEqual(unicode(self.ui.header.title_label.text()),
35 email_verification_page.VERIFY_EMAIL_TITLE)
36 expected = email_verification_page.VERIFY_EMAIL_CONTENT % {
37 "app_name": self.app_name,
38
39=== modified file 'ubuntu_sso/qt/tests/test_forgotten_password.py'
40--- ubuntu_sso/qt/tests/test_forgotten_password.py 2012-03-05 20:30:57 +0000
41+++ ubuntu_sso/qt/tests/test_forgotten_password.py 2012-03-12 20:55:06 +0000
42@@ -75,9 +75,10 @@
43 subtitle = gui.FORGOTTEN_PASSWORD_SUBTITLE
44 self.assert_subtitle_correct(subtitle.format(app_name=self.app_name))
45
46- self.assertEqual(self.ui.ui.email_address_label.text(),
47+ self.assertEqual(unicode(self.ui.ui.email_address_label.text()),
48 gui.EMAIL_LABEL)
49- self.assertEqual(self.ui.ui.send_button.text(), gui.RESET_PASSWORD)
50+ self.assertEqual(unicode(self.ui.ui.send_button.text()),
51+ gui.RESET_PASSWORD)
52
53 def test_connect_ui(self):
54 """Test the connect ui method."""
55
56=== modified file 'ubuntu_sso/qt/tests/test_reset_password.py'
57--- ubuntu_sso/qt/tests/test_reset_password.py 2012-03-05 18:56:50 +0000
58+++ ubuntu_sso/qt/tests/test_reset_password.py 2012-03-12 20:55:06 +0000
59@@ -75,10 +75,12 @@
60 self.addCleanup(self.ui.hide)
61 self.assert_title_correct(RESET_TITLE)
62 self.assert_subtitle_correct(RESET_SUBTITLE)
63- self.assertEqual(self.ui.ui.password_label.text(), PASSWORD1_ENTRY)
64- self.assertEqual(self.ui.ui.confirm_password_label.text(),
65+ self.assertEqual(unicode(self.ui.ui.password_label.text()),
66+ PASSWORD1_ENTRY)
67+ self.assertEqual(unicode(self.ui.ui.confirm_password_label.text()),
68 PASSWORD2_ENTRY)
69- self.assertEqual(self.ui.ui.reset_code.text(), RESET_CODE_ENTRY)
70+ self.assertEqual(unicode(self.ui.ui.reset_code.text()),
71+ RESET_CODE_ENTRY)
72
73 def test_focus_changed_password_visibility(self):
74 """Check visibility changes when focus_changed() is executed."""
75
76=== modified file 'ubuntu_sso/qt/tests/test_setup_account.py'
77--- ubuntu_sso/qt/tests/test_setup_account.py 2012-03-07 18:03:28 +0000
78+++ ubuntu_sso/qt/tests/test_setup_account.py 2012-03-12 20:55:06 +0000
79@@ -209,12 +209,15 @@
80 self.assertFalse(self.ui.captcha_received)
81
82 # labels
83- self.assertEqual(self.ui.ui.name_label.text(), gui.NAME_ENTRY)
84- self.assertEqual(self.ui.ui.email_label.text(), gui.EMAIL)
85- self.assertEqual(self.ui.ui.confirm_email_label.text(),
86+ self.assertEqual(unicode(self.ui.ui.name_label.text()),
87+ gui.NAME_ENTRY)
88+ self.assertEqual(unicode(self.ui.ui.email_label.text()),
89+ gui.EMAIL)
90+ self.assertEqual(unicode(self.ui.ui.confirm_email_label.text()),
91 gui.RETYPE_EMAIL)
92- self.assertEqual(self.ui.ui.password_label.text(), gui.PASSWORD)
93- self.assertEqual(self.ui.ui.confirm_password_label.text(),
94+ self.assertEqual(unicode(self.ui.ui.password_label.text()),
95+ gui.PASSWORD)
96+ self.assertEqual(unicode(self.ui.ui.confirm_password_label.text()),
97 gui.RETYPE_PASSWORD)
98
99 # assistants
100
101=== modified file 'ubuntu_sso/qt/tests/test_ssl_dialog.py'
102--- ubuntu_sso/qt/tests/test_ssl_dialog.py 2012-03-05 16:32:37 +0000
103+++ ubuntu_sso/qt/tests/test_ssl_dialog.py 2012-03-12 20:55:06 +0000
104@@ -142,7 +142,8 @@
105
106 def test_set_expander(self):
107 """Test that the expander is correctly set."""
108- self.assertEqual(SSL_CERT_DETAILS, self.dialog.expander.text())
109+ self.assertEqual(SSL_CERT_DETAILS,
110+ unicode(self.dialog.expander.text()))
111 self.assertNotEqual(None, self.dialog.expander.content)
112 self.assertEqual(2, self.dialog.ui.expander_layout.indexOf(
113 self.dialog.expander))
114
115=== modified file 'ubuntu_sso/utils/runner/glib.py'
116--- ubuntu_sso/utils/runner/glib.py 2012-02-17 18:43:17 +0000
117+++ ubuntu_sso/utils/runner/glib.py 2012-03-12 20:55:06 +0000
118@@ -27,7 +27,7 @@
119 logger = setup_logging("ubuntu_sso.utils.runner.glib")
120
121
122-NO_SUCH_FILE_OR_DIR = 'No such file or directory'
123+NO_SUCH_FILE_OR_DIR = '[Errno 2]'
124
125
126 def spawn_program(args, reply_handler, error_handler):
127
128=== modified file 'ubuntu_sso/utils/runner/tx.py'
129--- ubuntu_sso/utils/runner/tx.py 2012-02-17 19:13:15 +0000
130+++ ubuntu_sso/utils/runner/tx.py 2012-03-12 20:55:06 +0000
131@@ -26,7 +26,7 @@
132
133 logger = setup_logging("ubuntu_sso.utils.runner.tx")
134
135-NO_SUCH_FILE_OR_DIR = 'OSError: [Errno 2] No such file or directory'
136+NO_SUCH_FILE_OR_DIR = 'OSError: [Errno 2]'
137
138
139 EXE_EXT = ''

Subscribers

People subscribed via source and target branches