Merge lp:~ralsina/ubuntu-sso-client/fix_show_gui into lp:ubuntu-sso-client

Proposed by Roberto Alsina
Status: Merged
Approved by: Roberto Alsina
Approved revision: 753
Merged at revision: 752
Proposed branch: lp:~ralsina/ubuntu-sso-client/fix_show_gui
Merge into: lp:ubuntu-sso-client
Diff against target: 36 lines (+16/-5)
1 file modified
ubuntu_sso/qt/tests/show_gui.py (+16/-5)
To merge this branch: bzr merge lp:~ralsina/ubuntu-sso-client/fix_show_gui
Reviewer Review Type Date Requested Status
Diego Sarmentero (community) Approve
Review via email: mp+70202@code.launchpad.net

Commit message

Use CredentialsManagementClient instead of the deprecated API

Description of the change

Use CredentialsManagementClient instead of the deprecated API

To post a comment you must log in.
Revision history for this message
Diego Sarmentero (diegosarmentero) wrote :

+1

(just a comment: is the print statement necessary?
It's not part of this branch changes, but you can see it at the end.)

review: Approve
Revision history for this message
Roberto Alsina (ralsina) wrote :

> +1
>
> (just a comment: is the print statement necessary?
> It's not part of this branch changes, but you can see it at the end.)

Not necessary but well, it was there already.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntu_sso/qt/tests/show_gui.py'
2--- ubuntu_sso/qt/tests/show_gui.py 2011-06-30 03:46:20 +0000
3+++ ubuntu_sso/qt/tests/show_gui.py 2011-08-02 18:27:38 +0000
4@@ -20,6 +20,12 @@
5 from twisted.internet import reactor
6 from twisted.internet.defer import inlineCallbacks
7 from ubuntu_sso.main.windows import UbuntuSSOClient
8+from ubuntu_sso.credentials import (
9+ TC_URL_KEY,
10+ HELP_TEXT_KEY,
11+ WINDOW_ID_KEY,
12+ UI_MODULE_KEY,
13+)
14
15
16 def found(*args):
17@@ -33,11 +39,16 @@
18 """Perform a client request to be logged in."""
19 client = UbuntuSSOClient()
20 client = yield client.connect()
21- client.sso_cred.on_credentials_found_cb = found
22- yield client.sso_cred.register_to_signals()
23- yield client.sso_cred.login_or_register_to_get_credentials('Ubuntu One',
24- 'http://www.google.com',
25- 'This is a test.', 0)
26+ client.cred_management.on_credentials_found_cb = found
27+ yield client.cred_management.register_to_signals()
28+ yield client.cred_management.login(
29+ 'Ubuntu One',
30+ {
31+ TC_URL_KEY: 'http://www.google.com',
32+ HELP_TEXT_KEY: 'This is a test.',
33+ WINDOW_ID_KEY: 0,
34+ UI_MODULE_KEY: 'ubuntu_sso.qt.gui',
35+ })
36 print "called ok"
37
38

Subscribers

People subscribed via source and target branches