D-Bus testing: avoid duplicate testSync methods, minor improvements
When running all tests I noticed that the test runner showed the two testSync methods with their method and class name. Not sure whether this was because of the missing docstring or the duplication of the method name; renamed the methods and added a description to the test instead of the test suite. The TestSessionAPIsReal.testSync() had failed with a description that pointed towards the syncevo-dbus-server getting killed prematurely. In an attempt to track this down I added a check of self.quit_events, but then the test succeeded.
This commit is contained in:
parent
cf53493f14
commit
b6fda4d24d
|
@ -620,8 +620,10 @@ class TestSessionAPIsReal(unittest.TestCase, DBusUtil):
|
|||
self.setUpListeners(self.sessionpath)
|
||||
self.session.Sync("", {})
|
||||
loop.run()
|
||||
self.failUnlessEqual(self.quit_events, ["session " + self.sessionpath + " done"])
|
||||
|
||||
def testSync(self):
|
||||
'''run a real sync with default server'''
|
||||
self.doSync()
|
||||
# TODO: check recorded events in self.events
|
||||
status, error, sources = self.session.GetStatus(utf8_strings=True)
|
||||
|
@ -650,8 +652,6 @@ class TestSessionAPIsReal(unittest.TestCase, DBusUtil):
|
|||
self.failUnlessEqual(reports, [])
|
||||
|
||||
class TestDBusSyncError(unittest.TestCase, DBusUtil):
|
||||
"""Executes a real sync with no corresponding config."""
|
||||
|
||||
def setUp(self):
|
||||
DBusUtil.__init__(self)
|
||||
self.setUpServer()
|
||||
|
@ -660,7 +660,8 @@ class TestDBusSyncError(unittest.TestCase, DBusUtil):
|
|||
def run(self, result):
|
||||
self.runTest(result, own_xdg=True)
|
||||
|
||||
def testSync(self):
|
||||
def testSyncNoConfig(self):
|
||||
"""Executes a real sync with no corresponding config."""
|
||||
self.setUpListeners(self.sessionpath)
|
||||
self.session.Sync("", {})
|
||||
loop.run()
|
||||
|
|
Loading…
Reference in New Issue