Merge lp:~nataliabidart/ubuntuone-control-panel/use-new-syncademon-get-udf-fict into lp:ubuntuone-control-panel

Proposed by Natalia Bidart
Status: Merged
Approved by: Natalia Bidart
Approved revision: 74
Merged at revision: 74
Proposed branch: lp:~nataliabidart/ubuntuone-control-panel/use-new-syncademon-get-udf-fict
Merge into: lp:ubuntuone-control-panel
Diff against target: 57 lines (+6/-6)
1 file modified
ubuntuone/controlpanel/integrationtests/test_dbus_client_sd.py (+6/-6)
To merge this branch: bzr merge lp:~nataliabidart/ubuntuone-control-panel/use-new-syncademon-get-udf-fict
Reviewer Review Type Date Requested Status
Alejandro J. Cura (community) Approve
Manuel de la Peña (community) Approve
Review via email: mp+50594@code.launchpad.net

Commit message

Fixing tests according to latests changes to syncdaemon.

To post a comment you must log in.
Revision history for this message
Manuel de la Peña (mandel) wrote :

The get_udf_dict and get_share_dict have been moved to ubuntuone.syncdaemon.interaction_interfaces because they where common methods that where part of the dbus/ipc interface. The reason for them to be moved is due to the fact that the same dict is wanted in any platform, which explains why the tests broke... oh that evil _ ;)

+1

review: Approve
Revision history for this message
Alejandro J. Cura (alecu) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntuone/controlpanel/integrationtests/test_dbus_client_sd.py'
2--- ubuntuone/controlpanel/integrationtests/test_dbus_client_sd.py 2011-02-16 15:56:43 +0000
3+++ ubuntuone/controlpanel/integrationtests/test_dbus_client_sd.py 2011-02-21 13:47:38 +0000
4@@ -354,7 +354,7 @@
5 out_signature='aa{ss}')
6 def get_folders(self):
7 """Return the list of folders (a list of dicts)"""
8- return [sd_dbus_iface._get_udf_dict(udf) for udf in self.udfs.values()]
9+ return [sd_dbus_iface.get_udf_dict(udf) for udf in self.udfs.values()]
10
11 @dbus.service.method(sd_dbus_iface.DBUS_IFACE_FOLDERS_NAME,
12 in_signature='s', out_signature='')
13@@ -384,7 +384,7 @@
14 in_signature='s', out_signature='a{ss}')
15 def get_info(self, path):
16 """Override get_info to avoid accessing filesystem_manager."""
17- for fid, content in self.vm.udfs.iteritems():
18+ for fid, content in self.udfs.iteritems():
19 if content['path'] == path:
20 return content
21 else:
22@@ -401,7 +401,7 @@
23
24 def setUp(self):
25 super(FoldersTestCase, self).setUp()
26- self.patch(sd_dbus_iface, '_get_udf_dict', lambda udf: udf)
27+ self.patch(sd_dbus_iface, 'get_udf_dict', lambda udf: udf)
28 self.register_mockserver(sd_dbus_iface.DBUS_IFACE_NAME,
29 "/folders", FoldersMockDBusSyncDaemon)
30
31@@ -414,7 +414,7 @@
32 result = yield dbus_client.get_folders()
33
34 expected = FoldersMockDBusSyncDaemon._new_udf(1, path)
35- self.assertEqual(result, [sd_dbus_iface._get_udf_dict(expected)])
36+ self.assertEqual(result, [sd_dbus_iface.get_udf_dict(expected)])
37
38 @inlineCallbacks
39 def test_get_folders_error(self):
40@@ -426,7 +426,7 @@
41 """Fake an error."""
42 raise TestDBusException(value)
43
44- self.patch(sd_dbus_iface, '_get_udf_dict', fail)
45+ self.patch(sd_dbus_iface, 'get_udf_dict', fail)
46
47 try:
48 yield dbus_client.get_folders()
49@@ -442,7 +442,7 @@
50 folder_info = yield dbus_client.create_folder(path)
51
52 expected = FoldersMockDBusSyncDaemon._new_udf(1, path)
53- self.assertEqual(sd_dbus_iface._get_udf_dict(expected), folder_info)
54+ self.assertEqual(sd_dbus_iface.get_udf_dict(expected), folder_info)
55
56 @inlineCallbacks
57 def test_create_folder_error(self):

Subscribers

People subscribed via source and target branches