Merge lp:~nataliabidart/ubuntu/natty/ubuntu-sso-client/ubuntu-sso-client-1.2.1 into lp:ubuntu/natty/ubuntu-sso-client

Proposed by Natalia Bidart
Status: Merged
Merged at revision: 30
Proposed branch: lp:~nataliabidart/ubuntu/natty/ubuntu-sso-client/ubuntu-sso-client-1.2.1
Merge into: lp:ubuntu/natty/ubuntu-sso-client
Diff against target: 141 lines (+46/-6)
6 files modified
PKG-INFO (+1/-1)
debian/changelog (+9/-0)
pylintrc (+2/-1)
setup.py (+1/-1)
ubuntu_sso/utils/tests/test_txsecrets.py (+32/-2)
ubuntu_sso/utils/txsecrets.py (+1/-1)
To merge this branch: bzr merge lp:~nataliabidart/ubuntu/natty/ubuntu-sso-client/ubuntu-sso-client-1.2.1
Reviewer Review Type Date Requested Status
Ubuntu Sponsors Pending
Review via email: mp+57360@code.launchpad.net

Description of the change

  * New upstream release:
  [ Alejandro J. Cura <email address hidden> ]
    - A new value was added the Secret DBus struct (LP: #734671).

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'PKG-INFO'
2--- PKG-INFO 2011-03-30 20:39:37 +0000
3+++ PKG-INFO 2011-04-12 16:50:55 +0000
4@@ -1,6 +1,6 @@
5 Metadata-Version: 1.1
6 Name: ubuntu-sso-client
7-Version: 1.2.0
8+Version: 1.2.1
9 Summary: Ubuntu Single Sign-On client
10 Home-page: https://launchpad.net/ubuntu-sso-client
11 Author: Natalia Bidart
12
13=== modified file 'debian/changelog'
14--- debian/changelog 2011-03-31 16:08:45 +0000
15+++ debian/changelog 2011-04-12 16:50:55 +0000
16@@ -1,3 +1,12 @@
17+ubuntu-sso-client (1.2.1-0ubuntu1) UNRELEASED; urgency=low
18+
19+ * New upstream release:
20+
21+ [ Alejandro J. Cura <alecu@canonical.com> ]
22+ - A new value was added the Secret DBus struct (LP: #734671).
23+
24+ -- Natalia Bidart (nessita) <nataliabidart@gmail.com> Tue, 12 Apr 2011 13:43:24 -0300
25+
26 ubuntu-sso-client (1.2.0-0ubuntu1) natty; urgency=low
27
28 * New upstream release:
29
30=== modified file 'pylintrc'
31--- pylintrc 2010-10-11 13:22:16 +0000
32+++ pylintrc 2011-04-12 16:50:55 +0000
33@@ -50,7 +50,8 @@
34 # W0142: Used * or ** magic
35 # W0613: Unused argument 'yyy'
36 # C0302: Too many lines in module
37-disable=R,I,W0142,W0613,C0302
38+# W0404: Reimport of module
39+disable=R,I,W0142,W0613,C0302,W0404
40
41
42 [REPORTS]
43
44=== modified file 'setup.py'
45--- setup.py 2011-03-30 20:39:37 +0000
46+++ setup.py 2011-04-12 16:50:55 +0000
47@@ -86,7 +86,7 @@
48
49 DistUtilsExtra.auto.setup(
50 name='ubuntu-sso-client',
51- version='1.2.0',
52+ version='1.2.1',
53 license='GPL v3',
54 author='Natalia Bidart',
55 author_email='natalia.bidart@canonical.com',
56
57=== modified file 'ubuntu_sso/utils/tests/test_txsecrets.py'
58--- ubuntu_sso/utils/tests/test_txsecrets.py 2011-02-03 15:46:51 +0000
59+++ ubuntu_sso/utils/tests/test_txsecrets.py 2011-04-12 16:50:55 +0000
60@@ -40,6 +40,7 @@
61 PROMPT_BASE_PATH = "/org/freedesktop/secrets/prompt"
62 SESSION_BASE_PATH = "/org/freedesktop/secrets/session"
63 COLLECTION_BASE_PATH = "/org/freedesktop/secrets/collection/"
64+SAMPLE_CONTENT_TYPE = "text/plain; charset=utf8"
65
66
67 class SampleMiscException(Exception):
68@@ -95,6 +96,18 @@
69 return True
70
71
72+class AltItemMock(ItemMock):
73+ """The secret in this item has a content_type."""
74+
75+ @dbus.service.method(dbus_interface=txsecrets.ITEM_IFACE,
76+ in_signature="o", out_signature="(oayays)")
77+ def GetSecret(self, session):
78+ """Retrieve the secret for this item."""
79+ if self.get_secret_fail:
80+ raise SampleMiscException()
81+ return (session, "", self.value, SAMPLE_CONTENT_TYPE)
82+
83+
84 class PromptMock(dbus.service.Object):
85 """A prompt necessary to complete an operation."""
86
87@@ -126,6 +139,7 @@
88 create_item_fail = False
89 locked = False
90 unlock_prompts = False
91+ item_mock_class = ItemMock
92
93 def __init__(self, label, *args, **kwargs):
94 """Initialize this instance."""
95@@ -150,8 +164,8 @@
96 item_label = properties[txsecrets.LABEL_PROPERTY]
97 session, parameters, value = secret
98 item_path = create_object_path(make_coll_path(self.label))
99- item = self.dbus_publish(item_path, ItemMock, self, item_label,
100- attributes, value)
101+ item = self.dbus_publish(item_path, self.item_mock_class, self,
102+ item_label, attributes, value)
103 self.items.append(item)
104 if self.create_item_prompt:
105 prompt_path = create_object_path(PROMPT_BASE_PATH)
106@@ -746,6 +760,22 @@
107 self.assertEqual(value, sample_secret)
108
109 @inlineCallbacks
110+ def test_get_value_four_items_per_secret(self):
111+ """The code works fine when the secret dbus struct has 4 items."""
112+ yield self.secretservice.open_session()
113+ collection_label = "sample_keyring"
114+ coll = yield self.create_sample_collection(collection_label)
115+ mock_coll = self.mock_service.collections[collection_label]
116+ mock_coll.item_mock_class = AltItemMock
117+ attr = {"key-type": "Ubuntu SSO credentials"}
118+ sample_secret = "secret83!"
119+ yield coll.create_item("Cucaracha", attr, sample_secret)
120+ items = yield self.secretservice.search_items(attr)
121+ self.assertEqual(len(items), 1)
122+ value = yield items[0].get_value()
123+ self.assertEqual(value, sample_secret)
124+
125+ @inlineCallbacks
126 def test_get_value_throws_dbus_error(self):
127 """The secret value is not retrieved if DBus fails."""
128 yield self.secretservice.open_session()
129
130=== modified file 'ubuntu_sso/utils/txsecrets.py'
131--- ubuntu_sso/utils/txsecrets.py 2011-02-03 15:46:51 +0000
132+++ ubuntu_sso/utils/txsecrets.py 2011-04-12 16:50:55 +0000
133@@ -316,7 +316,7 @@
134 def getsecret_handler(secret):
135 """The secret for this item was found."""
136 # pylint: disable=W0612
137- session, parameters, value = secret
138+ value = secret[2]
139 d.callback(value)
140
141 self.item_iface.GetSecret(self.service.session, byte_arrays=True,

Subscribers

People subscribed via source and target branches