~ubuntu-branches/ubuntu/quantal/ubuntuone-control-panel/quantal-proposed

« back to all changes in this revision

Viewing changes to ubuntuone/controlpanel/dbustests/test_dbus_service.py

Tags: upstream-2.0.0
ImportĀ upstreamĀ versionĀ 2.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
        "limit_bandwidth": True,
51
51
        "max_upload_speed": 12345,
52
52
        "max_download_speed": 54321,
53
 
        "available_services": "files, contacts, music, bookmarks",
 
53
        "available_services": "files, contacts, music",
54
54
        "enabled_services": "files, music",
55
55
    },
56
56
    {
59
59
        "date_added": "2010-09-22T20:45:38.0",
60
60
        "type": "computer",
61
61
        "configurable": False,
62
 
        "available_services": "files, contacts, bookmarks",
63
 
        "enabled_services": "files, bookmarks",
 
62
        "available_services": "files, contacts",
 
63
        "enabled_services": "files",
64
64
    },
65
65
]
66
66
 
244
244
        """Configure a given replication."""
245
245
        return self._process(replication_id)
246
246
 
247
 
    def query_bookmark_extension(self):
248
 
        """True if the bookmark extension has been installed."""
249
 
        return self._process(False)
250
 
 
251
 
    def install_bookmarks_extension(self):
252
 
        """Install the extension to sync bookmarks."""
253
 
        return self._process(None)
254
 
 
255
247
    def shutdown(self):
256
248
        """Stop this service."""
257
249
        self.shutdown_func()
616
608
                expected_replication_id, {'enabled': ''})
617
609
        return self.assert_correct_method_call(*args)
618
610
 
619
 
    def test_query_bookmarks_extension(self):
620
 
        """The bookmarks extension is queried."""
621
 
 
622
 
        def got_signal(enabled):
623
 
            """The correct status was received."""
624
 
            self.assertEqual(enabled, False)
625
 
            self.deferred.callback("success")
626
 
 
627
 
        args = ("QueryBookmarksResult", "QueryBookmarksError", got_signal,
628
 
                self.backend.query_bookmark_extension)
629
 
        return self.assert_correct_method_call(*args)
630
 
 
631
 
    def test_install_bookmarks_extension(self):
632
 
        """The bookmarks extension is installed."""
633
 
 
634
 
        def got_signal():
635
 
            """The extension was installed."""
636
 
            self.deferred.callback("success")
637
 
 
638
 
        args = ("InstallBookmarksSuccess", "InstallBookmarksError", got_signal,
639
 
                self.backend.install_bookmarks_extension)
640
 
        return self.assert_correct_method_call(*args)
641
 
 
642
611
 
643
612
class OperationsErrorTestCase(OperationsTestCase):
644
613
    """Test for the DBus service operations when there is an error."""