tests.test_preferences.PreferencesTests should not depend on the system Dbus service
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_
Traceback (most recent call last):
Failure: dbus.exceptions
File "/usr/lib/
(candidate_
File "/usr/lib/
raise UnknownMethodEx
UnknownMethodEx
Related branches
- Roberto Alsina (community): Approve
- Natalia Bidart (community): Approve
-
Diff: 1757 lines (+1/-1717)5 files modifiedMakefile.am (+0/-1)
bin/ubuntuone-preferences (+0/-1140)
configure.ac (+1/-1)
po/POTFILES.in (+0/-1)
tests/test_preferences.py (+0/-574)
Changed in ubuntuone-client: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
assignee: | nobody → Ubuntu One Desktop+ team (ubuntuone-desktop+) |
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 |
Changed in ubuntuone-client: | |
status: | Fix Committed → Fix Released |
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.