D-Bus testing: fixed wrong check in TestConnection.testStartSync

The test checked for zero status for inactive sources, whereas the
current implementation doesn't report anything for these sources at
all. Both is acceptable, but let's keep the test strict and check for
the current behavior.
This commit is contained in:
Patrick Ohly 2011-07-04 17:18:58 +02:00
parent be08788419
commit 3d461623d0
1 changed files with 7 additions and 3 deletions

View File

@ -2023,9 +2023,13 @@ class TestConnection(unittest.TestCase, DBusUtil):
self.failUnlessEqual(sessions[0]["status"], "20043")
self.failUnlessEqual(sessions[0]["error"], "D-Bus peer has disconnected")
self.failUnlessEqual(sessions[0]["source-addressbook-status"], "20017")
self.failUnlessEqual(sessions[0]["source-calendar-status"], "0")
self.failUnlessEqual(sessions[0]["source-todo-status"], "0")
self.failUnlessEqual(sessions[0]["source-memo-status"], "0")
# The other three sources are disabled and should not be listed in the
# report. Used to be listed with status 0 in the past, which would also
# be acceptable, but here we use the strict check for "not present" to
# ensure that the current behavior is preserved.
self.failIf("source-calendar-status" in sessions[0])
self.failIf("source-todo-status" in sessions[0])
self.failIf("source-memo-status" in sessions[0])
def testCredentialsWrong(self):