tests.test_preferences.PreferencesTests should not depend on the system Dbus service

Bug #591340 reported by Natalia Bidart
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu One Client
Fix Released
Medium
dobey

Bug Description

Otherwise, if the service is not available, we get things like:

===============================================================================
[ERROR]: tests.test_preferences.PreferencesTests.test_login_check

Traceback (most recent call last):
Failure: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/dbus/service.py", line 649, in _message_cb
    (candidate_method, parent_method) = _method_lookup(self, method_name, interface_name)
  File "/usr/lib/pymodules/python2.6/dbus/service.py", line 244, in _method_lookup
    raise UnknownMethodException('%s is not a valid method of interface %s' % (method_name, dbus_interface))
UnknownMethodException: org.freedesktop.DBus.Error.UnknownMethod: Unknown method: login is not a valid method of interface com.ubuntu.sso

Related branches

Changed in ubuntuone-client:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Ubuntu One Desktop+ team (ubuntuone-desktop+)
Revision history for this message
dobey (dobey) wrote :

This seems to be due to the way DBus interfaces are tested in syncdaemon. The DBusTwistedTestCase is somewhat specific, and always provides the syncdaemon dbus api. When the test is created, the interface name is changed to com.ubuntu.sso, but the interface hasn't changed, so it doesn't provide the required login method, and we get the error above.

The DBusTestCase in ubuntuone.devtools.testcase is much simpler and allows the test being run to provide any interface. We need to swtich to using this, and migrate the syncdaemon's DBusTwistedTestCase to just be a more specific version of DBusTestCase for use with testing the syncdaemon DBus interfaces.

dobey (dobey)
Changed in ubuntuone-client:
assignee: Ubuntu One Desktop+ team (ubuntuone-desktop+) → Rodney Dawes (dobey)
status: Confirmed → In Progress
Changed in ubuntuone-client:
status: In Progress → Fix Committed
dobey (dobey)
Changed in ubuntuone-client:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.