Merge lp:~ralsina/ubuntu-sso-client/no-thread-execute into lp:ubuntu-sso-client
- no-thread-execute
- Merge into trunk
Proposed by
Roberto Alsina
Status: | Merged |
---|---|
Approved by: | Roberto Alsina |
Approved revision: | 748 |
Merged at revision: | 745 |
Proposed branch: | lp:~ralsina/ubuntu-sso-client/no-thread-execute |
Merge into: | lp:ubuntu-sso-client |
Diff against target: |
374 lines (+38/-39) 7 files modified
ubuntu_sso/main/__init__.py (+8/-6) ubuntu_sso/main/linux.py (+6/-6) ubuntu_sso/main/tests/test_common.py (+6/-7) ubuntu_sso/main/tests/test_linux.py (+5/-5) ubuntu_sso/main/tests/test_windows.py (+6/-7) ubuntu_sso/main/windows.py (+6/-6) ubuntu_sso/networkstate/windows.py (+1/-2) |
To merge this branch: | bzr merge lp:~ralsina/ubuntu-sso-client/no-thread-execute |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alejandro J. Cura (community) | Approve | ||
Review via email: mp+69280@code.launchpad.net |
Commit message
Remove the thread_execute arguments.
Description of the change
Remove the thread_execute arguments.
To post a comment you must log in.
- 747. By Roberto Alsina
-
fix EOLs
- 748. By Roberto Alsina
-
lint fixes
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'ubuntu_sso/main/__init__.py' | |||
2 | --- ubuntu_sso/main/__init__.py 2011-07-14 18:58:00 +0000 | |||
3 | +++ ubuntu_sso/main/__init__.py 2011-07-26 15:38:26 +0000 | |||
4 | @@ -75,7 +75,7 @@ | |||
5 | 75 | self.processor = self.sso_login_processor_class( | 75 | self.processor = self.sso_login_processor_class( |
6 | 76 | sso_service_class=sso_service_class) | 76 | sso_service_class=sso_service_class) |
7 | 77 | 77 | ||
9 | 78 | def generate_captcha(self, app_name, filename, thread_execute, result_cb, | 78 | def generate_captcha(self, app_name, filename, result_cb, |
10 | 79 | error_cb): | 79 | error_cb): |
11 | 80 | """Call the matching method in the processor.""" | 80 | """Call the matching method in the processor.""" |
12 | 81 | def f(): | 81 | def f(): |
13 | @@ -84,7 +84,7 @@ | |||
14 | 84 | thread_execute(f, app_name, result_cb, error_cb) | 84 | thread_execute(f, app_name, result_cb, error_cb) |
15 | 85 | 85 | ||
16 | 86 | def register_user(self, app_name, email, password, name, captcha_id, | 86 | def register_user(self, app_name, email, password, name, captcha_id, |
18 | 87 | captcha_solution, thread_execute, result_cb, error_cb): | 87 | captcha_solution, result_cb, error_cb): |
19 | 88 | """Call the matching method in the processor.""" | 88 | """Call the matching method in the processor.""" |
20 | 89 | def f(): | 89 | def f(): |
21 | 90 | """Inner function that will be run in a thread.""" | 90 | """Inner function that will be run in a thread.""" |
22 | @@ -92,7 +92,7 @@ | |||
23 | 92 | captcha_id, captcha_solution) | 92 | captcha_id, captcha_solution) |
24 | 93 | thread_execute(f, app_name, result_cb, error_cb) | 93 | thread_execute(f, app_name, result_cb, error_cb) |
25 | 94 | 94 | ||
27 | 95 | def login(self, app_name, email, password, thread_execute, result_cb, | 95 | def login(self, app_name, email, password, result_cb, |
28 | 96 | error_cb, not_validated_cb): | 96 | error_cb, not_validated_cb): |
29 | 97 | """Call the matching method in the processor.""" | 97 | """Call the matching method in the processor.""" |
30 | 98 | def f(): | 98 | def f(): |
31 | @@ -121,7 +121,7 @@ | |||
32 | 121 | thread_execute(f, app_name, success_cb, error_cb) | 121 | thread_execute(f, app_name, success_cb, error_cb) |
33 | 122 | 122 | ||
34 | 123 | def validate_email(self, app_name, email, password, email_token, | 123 | def validate_email(self, app_name, email, password, email_token, |
36 | 124 | thread_execute, result_cb, error_cb): | 124 | result_cb, error_cb): |
37 | 125 | """Call the matching method in the processor.""" | 125 | """Call the matching method in the processor.""" |
38 | 126 | 126 | ||
39 | 127 | def f(): | 127 | def f(): |
40 | @@ -141,7 +141,7 @@ | |||
41 | 141 | 141 | ||
42 | 142 | thread_execute(f, app_name, success_cb, error_cb) | 142 | thread_execute(f, app_name, success_cb, error_cb) |
43 | 143 | 143 | ||
45 | 144 | def request_password_reset_token(self, app_name, email, thread_execute, | 144 | def request_password_reset_token(self, app_name, email, |
46 | 145 | result_cb, error_cb): | 145 | result_cb, error_cb): |
47 | 146 | """Call the matching method in the processor.""" | 146 | """Call the matching method in the processor.""" |
48 | 147 | def f(): | 147 | def f(): |
49 | @@ -150,7 +150,7 @@ | |||
50 | 150 | thread_execute(f, app_name, result_cb, error_cb) | 150 | thread_execute(f, app_name, result_cb, error_cb) |
51 | 151 | 151 | ||
52 | 152 | def set_new_password(self, app_name, email, token, new_password, | 152 | def set_new_password(self, app_name, email, token, new_password, |
54 | 153 | thread_execute, result_cb, error_cb): | 153 | result_cb, error_cb): |
55 | 154 | """Call the matching method in the processor.""" | 154 | """Call the matching method in the processor.""" |
56 | 155 | def f(): | 155 | def f(): |
57 | 156 | """Inner function that will be run in a thread.""" | 156 | """Inner function that will be run in a thread.""" |
58 | @@ -410,8 +410,10 @@ | |||
59 | 410 | SSOCredentials = windows.SSOCredentials | 410 | SSOCredentials = windows.SSOCredentials |
60 | 411 | CredentialsManagement = windows.CredentialsManagement | 411 | CredentialsManagement = windows.CredentialsManagement |
61 | 412 | TIMEOUT_INTERVAL = 10000000000 # forever | 412 | TIMEOUT_INTERVAL = 10000000000 # forever |
62 | 413 | thread_execute = windows.blocking | ||
63 | 413 | else: | 414 | else: |
64 | 414 | from ubuntu_sso.main import linux | 415 | from ubuntu_sso.main import linux |
65 | 415 | SSOLogin = linux.SSOLogin | 416 | SSOLogin = linux.SSOLogin |
66 | 416 | SSOCredentials = linux.SSOCredentials | 417 | SSOCredentials = linux.SSOCredentials |
67 | 417 | CredentialsManagement = linux.CredentialsManagement | 418 | CredentialsManagement = linux.CredentialsManagement |
68 | 419 | thread_execute = linux.blocking | ||
69 | 418 | 420 | ||
70 | === modified file 'ubuntu_sso/main/linux.py' | |||
71 | --- ubuntu_sso/main/linux.py 2011-04-25 18:41:34 +0000 | |||
72 | +++ ubuntu_sso/main/linux.py 2011-07-26 15:38:26 +0000 | |||
73 | @@ -92,7 +92,7 @@ | |||
74 | 92 | in_signature='ss') | 92 | in_signature='ss') |
75 | 93 | def generate_captcha(self, app_name, filename): | 93 | def generate_captcha(self, app_name, filename): |
76 | 94 | """Call the matching method in the processor.""" | 94 | """Call the matching method in the processor.""" |
78 | 95 | self.root.generate_captcha(app_name, filename, blocking, | 95 | self.root.generate_captcha(app_name, filename, |
79 | 96 | self.CaptchaGenerated, | 96 | self.CaptchaGenerated, |
80 | 97 | self.CaptchaGenerationError) | 97 | self.CaptchaGenerationError) |
81 | 98 | 98 | ||
82 | @@ -115,7 +115,7 @@ | |||
83 | 115 | captcha_id, captcha_solution): | 115 | captcha_id, captcha_solution): |
84 | 116 | """Call the matching method in the processor.""" | 116 | """Call the matching method in the processor.""" |
85 | 117 | self.root.register_user(app_name, email, password, name, captcha_id, | 117 | self.root.register_user(app_name, email, password, name, captcha_id, |
87 | 118 | captcha_solution, blocking, | 118 | captcha_solution, |
88 | 119 | self.UserRegistered, | 119 | self.UserRegistered, |
89 | 120 | self.UserRegistrationError) | 120 | self.UserRegistrationError) |
90 | 121 | 121 | ||
91 | @@ -142,7 +142,7 @@ | |||
92 | 142 | in_signature='sss') | 142 | in_signature='sss') |
93 | 143 | def login(self, app_name, email, password): | 143 | def login(self, app_name, email, password): |
94 | 144 | """Call the matching method in the processor.""" | 144 | """Call the matching method in the processor.""" |
96 | 145 | self.root.login(app_name, email, password, blocking, self.LoggedIn, | 145 | self.root.login(app_name, email, password, self.LoggedIn, |
97 | 146 | self.LoginError, self.UserNotValidated) | 146 | self.LoginError, self.UserNotValidated) |
98 | 147 | 147 | ||
99 | 148 | # validate_email signals | 148 | # validate_email signals |
100 | @@ -163,7 +163,7 @@ | |||
101 | 163 | def validate_email(self, app_name, email, password, email_token): | 163 | def validate_email(self, app_name, email, password, email_token): |
102 | 164 | """Call the matching method in the processor.""" | 164 | """Call the matching method in the processor.""" |
103 | 165 | self.root.validate_email(app_name, email, password, email_token, | 165 | self.root.validate_email(app_name, email, password, email_token, |
105 | 166 | blocking, self.EmailValidated, | 166 | self.EmailValidated, |
106 | 167 | self.EmailValidationError) | 167 | self.EmailValidationError) |
107 | 168 | 168 | ||
108 | 169 | # request_password_reset_token signals | 169 | # request_password_reset_token signals |
109 | @@ -183,7 +183,7 @@ | |||
110 | 183 | in_signature='ss') | 183 | in_signature='ss') |
111 | 184 | def request_password_reset_token(self, app_name, email): | 184 | def request_password_reset_token(self, app_name, email): |
112 | 185 | """Call the matching method in the processor.""" | 185 | """Call the matching method in the processor.""" |
114 | 186 | self.root.request_password_reset_token(app_name, email, blocking, | 186 | self.root.request_password_reset_token(app_name, email, |
115 | 187 | self.PasswordResetTokenSent, | 187 | self.PasswordResetTokenSent, |
116 | 188 | self.PasswordResetError) | 188 | self.PasswordResetError) |
117 | 189 | 189 | ||
118 | @@ -205,7 +205,7 @@ | |||
119 | 205 | def set_new_password(self, app_name, email, token, new_password): | 205 | def set_new_password(self, app_name, email, token, new_password): |
120 | 206 | """Call the matching method in the processor.""" | 206 | """Call the matching method in the processor.""" |
121 | 207 | self.root.set_new_password(app_name, email, token, new_password, | 207 | self.root.set_new_password(app_name, email, token, new_password, |
123 | 208 | blocking, self.PasswordChanged, | 208 | self.PasswordChanged, |
124 | 209 | self.PasswordChangeError) | 209 | self.PasswordChangeError) |
125 | 210 | 210 | ||
126 | 211 | 211 | ||
127 | 212 | 212 | ||
128 | === modified file 'ubuntu_sso/main/tests/test_common.py' | |||
129 | --- ubuntu_sso/main/tests/test_common.py 2011-03-31 09:33:48 +0000 | |||
130 | +++ ubuntu_sso/main/tests/test_common.py 2011-07-26 15:38:26 +0000 | |||
131 | @@ -75,7 +75,7 @@ | |||
132 | 75 | """Test that the call is relayed.""" | 75 | """Test that the call is relayed.""" |
133 | 76 | app_name = 'app' | 76 | app_name = 'app' |
134 | 77 | filename = 'file' | 77 | filename = 'file' |
136 | 78 | self.root.generate_captcha(app_name, filename, MATCH(callable), | 78 | self.root.generate_captcha(app_name, filename, |
137 | 79 | MATCH(callable), MATCH(callable)) | 79 | MATCH(callable), MATCH(callable)) |
138 | 80 | self.mocker.replay() | 80 | self.mocker.replay() |
139 | 81 | self.login.generate_captcha(app_name, filename) | 81 | self.login.generate_captcha(app_name, filename) |
140 | @@ -89,7 +89,7 @@ | |||
141 | 89 | captcha_id = 'id' | 89 | captcha_id = 'id' |
142 | 90 | captcha_solution = 'hello' | 90 | captcha_solution = 'hello' |
143 | 91 | self.root.register_user(app_name, email, password, name, captcha_id, | 91 | self.root.register_user(app_name, email, password, name, captcha_id, |
145 | 92 | captcha_solution, MATCH(callable), | 92 | captcha_solution, |
146 | 93 | MATCH(callable), MATCH(callable)) | 93 | MATCH(callable), MATCH(callable)) |
147 | 94 | self.mocker.replay() | 94 | self.mocker.replay() |
148 | 95 | self.login.register_user(app_name, email, password, name, captcha_id, | 95 | self.login.register_user(app_name, email, password, name, captcha_id, |
149 | @@ -100,7 +100,7 @@ | |||
150 | 100 | app_name = 'app' | 100 | app_name = 'app' |
151 | 101 | email = 'email' | 101 | email = 'email' |
152 | 102 | password = 'password' | 102 | password = 'password' |
154 | 103 | self.root.login(app_name, email, password, MATCH(callable), | 103 | self.root.login(app_name, email, password, |
155 | 104 | MATCH(callable), MATCH(callable), | 104 | MATCH(callable), MATCH(callable), |
156 | 105 | MATCH(callable)) | 105 | MATCH(callable)) |
157 | 106 | self.mocker.mock() | 106 | self.mocker.mock() |
158 | @@ -114,18 +114,17 @@ | |||
159 | 114 | password = 'passwrd' | 114 | password = 'passwrd' |
160 | 115 | email_token = 'token' | 115 | email_token = 'token' |
161 | 116 | self.root.validate_email(app_name, email, password, email_token, | 116 | self.root.validate_email(app_name, email, password, email_token, |
163 | 117 | MATCH(callable), MATCH(callable), | 117 | MATCH(callable), |
164 | 118 | MATCH(callable)) | 118 | MATCH(callable)) |
165 | 119 | self.mocker.replay() | 119 | self.mocker.replay() |
166 | 120 | self.login.validate_email(app_name, email, password, email_token) | 120 | self.login.validate_email(app_name, email, password, email_token) |
167 | 121 | 121 | ||
169 | 122 | def test_request_password_reset_tolen(self): | 122 | def test_request_password_reset_token(self): |
170 | 123 | """Test that the call is relayed.""" | 123 | """Test that the call is relayed.""" |
171 | 124 | app_name = 'app' | 124 | app_name = 'app' |
172 | 125 | email = 'email' | 125 | email = 'email' |
173 | 126 | self.root.request_password_reset_token(app_name, email, | 126 | self.root.request_password_reset_token(app_name, email, |
174 | 127 | MATCH(callable), | 127 | MATCH(callable), |
175 | 128 | MATCH(callable), | ||
176 | 129 | MATCH(callable)) | 128 | MATCH(callable)) |
177 | 130 | self.mocker.replay() | 129 | self.mocker.replay() |
178 | 131 | self.login.request_password_reset_token(app_name, email) | 130 | self.login.request_password_reset_token(app_name, email) |
179 | @@ -137,7 +136,7 @@ | |||
180 | 137 | token = 'token' | 136 | token = 'token' |
181 | 138 | new_password = 'new' | 137 | new_password = 'new' |
182 | 139 | self.root.set_new_password(app_name, email, token, new_password, | 138 | self.root.set_new_password(app_name, email, token, new_password, |
184 | 140 | MATCH(callable), MATCH(callable), | 139 | MATCH(callable), |
185 | 141 | MATCH(callable)) | 140 | MATCH(callable)) |
186 | 142 | self.mocker.replay() | 141 | self.mocker.replay() |
187 | 143 | self.login.set_new_password(app_name, email, token, new_password) | 142 | self.login.set_new_password(app_name, email, token, new_password) |
188 | 144 | 143 | ||
189 | === modified file 'ubuntu_sso/main/tests/test_linux.py' | |||
190 | --- ubuntu_sso/main/tests/test_linux.py 2011-03-31 03:52:10 +0000 | |||
191 | +++ ubuntu_sso/main/tests/test_linux.py 2011-07-26 15:38:26 +0000 | |||
192 | @@ -144,7 +144,7 @@ | |||
193 | 144 | expected_result = "expected result" | 144 | expected_result = "expected result" |
194 | 145 | self.create_mock_processor().generate_captcha(filename) | 145 | self.create_mock_processor().generate_captcha(filename) |
195 | 146 | self.mocker.result(expected_result) | 146 | self.mocker.result(expected_result) |
197 | 147 | self.patch(ubuntu_sso.main.linux, "blocking", fake_err_blocking) | 147 | self.patch(ubuntu_sso.main, "thread_execute", fake_err_blocking) |
198 | 148 | self.mocker.replay() | 148 | self.mocker.replay() |
199 | 149 | 149 | ||
200 | 150 | def verify(app_name, errdict): | 150 | def verify(app_name, errdict): |
201 | @@ -191,7 +191,7 @@ | |||
202 | 191 | self.create_mock_processor().register_user(EMAIL, PASSWORD, NAME, | 191 | self.create_mock_processor().register_user(EMAIL, PASSWORD, NAME, |
203 | 192 | CAPTCHA_ID, CAPTCHA_SOLUTION) | 192 | CAPTCHA_ID, CAPTCHA_SOLUTION) |
204 | 193 | self.mocker.result(expected_result) | 193 | self.mocker.result(expected_result) |
206 | 194 | self.patch(ubuntu_sso.main.linux, "blocking", fake_err_blocking) | 194 | self.patch(ubuntu_sso.main, "thread_execute", fake_err_blocking) |
207 | 195 | self.mocker.replay() | 195 | self.mocker.replay() |
208 | 196 | 196 | ||
209 | 197 | def verify(app_name, errdict): | 197 | def verify(app_name, errdict): |
210 | @@ -377,7 +377,7 @@ | |||
211 | 377 | d = Deferred() | 377 | d = Deferred() |
212 | 378 | processor = self.create_mock_processor() | 378 | processor = self.create_mock_processor() |
213 | 379 | processor.request_password_reset_token(EMAIL) | 379 | processor.request_password_reset_token(EMAIL) |
215 | 380 | self.patch(ubuntu_sso.main.linux, "blocking", fake_ok_blocking) | 380 | self.patch(ubuntu_sso.main, "thread_execute", fake_ok_blocking) |
216 | 381 | self.mocker.result(EMAIL) | 381 | self.mocker.result(EMAIL) |
217 | 382 | self.mocker.replay() | 382 | self.mocker.replay() |
218 | 383 | 383 | ||
219 | @@ -400,7 +400,7 @@ | |||
220 | 400 | 400 | ||
221 | 401 | self.create_mock_processor().request_password_reset_token(EMAIL) | 401 | self.create_mock_processor().request_password_reset_token(EMAIL) |
222 | 402 | self.mocker.result(EMAIL) | 402 | self.mocker.result(EMAIL) |
224 | 403 | self.patch(ubuntu_sso.main.linux, "blocking", fake_err_blocking) | 403 | self.patch(ubuntu_sso.main, "thread_execute", fake_err_blocking) |
225 | 404 | self.mocker.replay() | 404 | self.mocker.replay() |
226 | 405 | 405 | ||
227 | 406 | def verify(app_name, errdict): | 406 | def verify(app_name, errdict): |
228 | @@ -446,7 +446,7 @@ | |||
229 | 446 | self.create_mock_processor().set_new_password(EMAIL, EMAIL_TOKEN, | 446 | self.create_mock_processor().set_new_password(EMAIL, EMAIL_TOKEN, |
230 | 447 | PASSWORD) | 447 | PASSWORD) |
231 | 448 | self.mocker.result(expected_result) | 448 | self.mocker.result(expected_result) |
233 | 449 | self.patch(ubuntu_sso.main.linux, "blocking", fake_err_blocking) | 449 | self.patch(ubuntu_sso.main, "thread_execute", fake_err_blocking) |
234 | 450 | self.mocker.replay() | 450 | self.mocker.replay() |
235 | 451 | 451 | ||
236 | 452 | def verify(app_name, errdict): | 452 | def verify(app_name, errdict): |
237 | 453 | 453 | ||
238 | === modified file 'ubuntu_sso/main/tests/test_windows.py' | |||
239 | --- ubuntu_sso/main/tests/test_windows.py 2011-07-13 19:47:18 +0000 | |||
240 | +++ ubuntu_sso/main/tests/test_windows.py 2011-07-26 15:38:26 +0000 | |||
241 | @@ -30,7 +30,6 @@ | |||
242 | 30 | ) | 30 | ) |
243 | 31 | from ubuntu_sso.main import windows | 31 | from ubuntu_sso.main import windows |
244 | 32 | from ubuntu_sso.main.windows import ( | 32 | from ubuntu_sso.main.windows import ( |
245 | 33 | blocking, | ||
246 | 34 | signal, | 33 | signal, |
247 | 35 | CredentialsManagement, | 34 | CredentialsManagement, |
248 | 36 | CredentialsManagementClient, | 35 | CredentialsManagementClient, |
249 | @@ -292,7 +291,7 @@ | |||
250 | 292 | @defer.inlineCallbacks | 291 | @defer.inlineCallbacks |
251 | 293 | def test_execution(client): | 292 | def test_execution(client): |
252 | 294 | """Actual test.""" | 293 | """Actual test.""" |
254 | 295 | self.root.generate_captcha(app_name, filename, blocking, | 294 | self.root.generate_captcha(app_name, filename, |
255 | 296 | self.login.emit_captcha_generated, | 295 | self.login.emit_captcha_generated, |
256 | 297 | self.login.emit_captcha_generation_error) | 296 | self.login.emit_captcha_generation_error) |
257 | 298 | self.mocker.replay() | 297 | self.mocker.replay() |
258 | @@ -364,7 +363,7 @@ | |||
259 | 364 | def test_execution(client): | 363 | def test_execution(client): |
260 | 365 | """Actual test.""" | 364 | """Actual test.""" |
261 | 366 | self.root.register_user(app_name, email, password, displayname, | 365 | self.root.register_user(app_name, email, password, displayname, |
263 | 367 | captcha_id, captcha_solution, blocking, | 366 | captcha_id, captcha_solution, |
264 | 368 | self.login.emit_user_registered, | 367 | self.login.emit_user_registered, |
265 | 369 | self.login.emit_user_registration_error) | 368 | self.login.emit_user_registration_error) |
266 | 370 | self.mocker.replay() | 369 | self.mocker.replay() |
267 | @@ -453,7 +452,7 @@ | |||
268 | 453 | @defer.inlineCallbacks | 452 | @defer.inlineCallbacks |
269 | 454 | def test_execution(client): | 453 | def test_execution(client): |
270 | 455 | """Actual test.""" | 454 | """Actual test.""" |
272 | 456 | self.root.login(app_name, email, password, blocking, | 455 | self.root.login(app_name, email, password, |
273 | 457 | self.login.emit_logged_in, | 456 | self.login.emit_logged_in, |
274 | 458 | self.login.emit_login_error, | 457 | self.login.emit_login_error, |
275 | 459 | self.login.emit_user_not_validated) | 458 | self.login.emit_user_not_validated) |
276 | @@ -524,7 +523,7 @@ | |||
277 | 524 | def test_execution(client): | 523 | def test_execution(client): |
278 | 525 | """Actual test.""" | 524 | """Actual test.""" |
279 | 526 | self.root.validate_email(app_name, email, password, email_token, | 525 | self.root.validate_email(app_name, email, password, email_token, |
281 | 527 | blocking, self.login.emit_email_validated, | 526 | self.login.emit_email_validated, |
282 | 528 | self.login.emit_email_validation_error) | 527 | self.login.emit_email_validation_error) |
283 | 529 | self.mocker.replay() | 528 | self.mocker.replay() |
284 | 530 | yield client.validate_email(app_name, email, password, email_token) | 529 | yield client.validate_email(app_name, email, password, email_token) |
285 | @@ -590,7 +589,7 @@ | |||
286 | 590 | @defer.inlineCallbacks | 589 | @defer.inlineCallbacks |
287 | 591 | def test_execution(client): | 590 | def test_execution(client): |
288 | 592 | """Actual test.""" | 591 | """Actual test.""" |
290 | 593 | self.root.request_password_reset_token(app_name, email, blocking, | 592 | self.root.request_password_reset_token(app_name, email, |
291 | 594 | self.login.emit_password_reset_token_sent, | 593 | self.login.emit_password_reset_token_sent, |
292 | 595 | self.login.emit_password_reset_error) | 594 | self.login.emit_password_reset_error) |
293 | 596 | self.mocker.replay() | 595 | self.mocker.replay() |
294 | @@ -660,7 +659,7 @@ | |||
295 | 660 | def test_execution(client): | 659 | def test_execution(client): |
296 | 661 | """Actual test.""" | 660 | """Actual test.""" |
297 | 662 | self.root.set_new_password(app_name, email, token, new_password, | 661 | self.root.set_new_password(app_name, email, token, new_password, |
299 | 663 | blocking, self.login.emit_password_changed, | 662 | self.login.emit_password_changed, |
300 | 664 | self.login.emit_password_change_error) | 663 | self.login.emit_password_change_error) |
301 | 665 | self.mocker.replay() | 664 | self.mocker.replay() |
302 | 666 | yield client.set_new_password(app_name, email, token, new_password) | 665 | yield client.set_new_password(app_name, email, token, new_password) |
303 | 667 | 666 | ||
304 | === modified file 'ubuntu_sso/main/windows.py' | |||
305 | --- ubuntu_sso/main/windows.py 2011-07-16 04:14:45 +0000 | |||
306 | +++ ubuntu_sso/main/windows.py 2011-07-26 15:38:26 +0000 | |||
307 | @@ -177,7 +177,7 @@ | |||
308 | 177 | 177 | ||
309 | 178 | def generate_captcha(self, app_name, filename): | 178 | def generate_captcha(self, app_name, filename): |
310 | 179 | """Call the matching method in the processor.""" | 179 | """Call the matching method in the processor.""" |
312 | 180 | self.root.generate_captcha(app_name, filename, blocking, | 180 | self.root.generate_captcha(app_name, filename, |
313 | 181 | self.emit_captcha_generated, | 181 | self.emit_captcha_generated, |
314 | 182 | self.emit_captcha_generation_error) | 182 | self.emit_captcha_generation_error) |
315 | 183 | 183 | ||
316 | @@ -199,7 +199,7 @@ | |||
317 | 199 | captcha_id, captcha_solution): | 199 | captcha_id, captcha_solution): |
318 | 200 | """Call the matching method in the processor.""" | 200 | """Call the matching method in the processor.""" |
319 | 201 | self.root.register_user(app_name, email, password, displayname, | 201 | self.root.register_user(app_name, email, password, displayname, |
321 | 202 | captcha_id, captcha_solution, blocking, | 202 | captcha_id, captcha_solution, |
322 | 203 | self.emit_user_registered, | 203 | self.emit_user_registered, |
323 | 204 | self.emit_user_registration_error) | 204 | self.emit_user_registration_error) |
324 | 205 | 205 | ||
325 | @@ -225,7 +225,7 @@ | |||
326 | 225 | 225 | ||
327 | 226 | def login(self, app_name, email, password): | 226 | def login(self, app_name, email, password): |
328 | 227 | """Call the matching method in the processor.""" | 227 | """Call the matching method in the processor.""" |
330 | 228 | self.root.login(app_name, email, password, blocking, | 228 | self.root.login(app_name, email, password, |
331 | 229 | self.emit_logged_in, self.emit_login_error, | 229 | self.emit_logged_in, self.emit_login_error, |
332 | 230 | self.emit_user_not_validated) | 230 | self.emit_user_not_validated) |
333 | 231 | 231 | ||
334 | @@ -246,7 +246,7 @@ | |||
335 | 246 | def validate_email(self, app_name, email, password, email_token): | 246 | def validate_email(self, app_name, email, password, email_token): |
336 | 247 | """Call the matching method in the processor.""" | 247 | """Call the matching method in the processor.""" |
337 | 248 | self.root.validate_email(app_name, email, password, email_token, | 248 | self.root.validate_email(app_name, email, password, email_token, |
339 | 249 | blocking, self.emit_email_validated, | 249 | self.emit_email_validated, |
340 | 250 | self.emit_email_validation_error) | 250 | self.emit_email_validation_error) |
341 | 251 | 251 | ||
342 | 252 | # request_password_reset_token signals | 252 | # request_password_reset_token signals |
343 | @@ -265,7 +265,7 @@ | |||
344 | 265 | 265 | ||
345 | 266 | def request_password_reset_token(self, app_name, email): | 266 | def request_password_reset_token(self, app_name, email): |
346 | 267 | """Call the matching method in the processor.""" | 267 | """Call the matching method in the processor.""" |
348 | 268 | self.root.request_password_reset_token(app_name, email, blocking, | 268 | self.root.request_password_reset_token(app_name, email, |
349 | 269 | self.emit_password_reset_token_sent, | 269 | self.emit_password_reset_token_sent, |
350 | 270 | self.emit_password_reset_error) | 270 | self.emit_password_reset_error) |
351 | 271 | 271 | ||
352 | @@ -286,7 +286,7 @@ | |||
353 | 286 | def set_new_password(self, app_name, email, token, new_password): | 286 | def set_new_password(self, app_name, email, token, new_password): |
354 | 287 | """Call the matching method in the processor.""" | 287 | """Call the matching method in the processor.""" |
355 | 288 | self.root.set_new_password(app_name, email, token, new_password, | 288 | self.root.set_new_password(app_name, email, token, new_password, |
357 | 289 | blocking, self.emit_password_changed, | 289 | self.emit_password_changed, |
358 | 290 | self.emit_password_change_error) | 290 | self.emit_password_change_error) |
359 | 291 | 291 | ||
360 | 292 | 292 | ||
361 | 293 | 293 | ||
362 | === modified file 'ubuntu_sso/networkstate/windows.py' | |||
363 | --- ubuntu_sso/networkstate/windows.py 2011-07-25 14:45:33 +0000 | |||
364 | +++ ubuntu_sso/networkstate/windows.py 2011-07-26 15:38:26 +0000 | |||
365 | @@ -102,8 +102,7 @@ | |||
366 | 102 | 102 | ||
367 | 103 | def __init__(self, connected_cb=None, connected_cb_info=None, | 103 | def __init__(self, connected_cb=None, connected_cb_info=None, |
368 | 104 | disconnected_cb=None): | 104 | disconnected_cb=None): |
371 | 105 | # pylint: disable=E1101,E1120 | 105 | # pylint: disable=E1101,E1120,W0231 |
370 | 106 | DesignatedWrapPolicy.__init__(self) | ||
372 | 107 | self._wrap_(self) | 106 | self._wrap_(self) |
373 | 108 | # pylint: enable=E1101,E1120 | 107 | # pylint: enable=E1101,E1120 |
374 | 109 | self.connected_cb = connected_cb | 108 | self.connected_cb = connected_cb |
Looks fine, thanks!