Testing: add a case with config name "@context" for getReports
Add a unit test case to test the correct log dirs are gotten when a config name "@context" is set. Only the logdirs generated by the peers in that context are returned.
This commit is contained in:
parent
2323717202
commit
0aa6a02c33
|
@ -680,6 +680,15 @@ class TestSessionAPIsEmptyName(unittest.TestCase, DBusUtil):
|
|||
for i in range(0, len(refPeers)):
|
||||
self.failUnlessEqual(reports[i]["peer"], refPeers[i])
|
||||
|
||||
def testGetReportsContext(self):
|
||||
"""Test reports from a context are returned when the peer name is empty for GetReports"""
|
||||
self.setupFiles('reports')
|
||||
self.session.Detach()
|
||||
self.setUpSession("@context")
|
||||
reports = self.session.GetReports(0, 0xFFFFFFFF, utf8_strings=True)
|
||||
self.failUnlessEqual(len(reports), 1)
|
||||
self.failUnless(reports[0]["dir"].endswith("dummy_+test@context-2010-01-20-10-10"))
|
||||
|
||||
|
||||
class TestSessionAPIsDummy(unittest.TestCase, DBusUtil):
|
||||
"""Tests that work for GetConfig/SetConfig/CheckSource/GetDatabases/GetReports in Session.
|
||||
|
|
39
test/test-dbus/reports/cache/syncevolution/dummy_+test@context-2010-01-20-10-10/status.ini
vendored
Normal file
39
test/test-dbus/reports/cache/syncevolution/dummy_+test@context-2010-01-20-10-10/status.ini
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
start = 1258520273, 2010-01-20 12:11:53 +0800
|
||||
end = 1258520283, 2010-01-20 12:11:03 +0800
|
||||
status = 200
|
||||
source-addressbook-mode = slow
|
||||
source-addressbook-first = true
|
||||
source-addressbook-resume = false
|
||||
source-addressbook-status = 0
|
||||
source-addressbook-backup-before = 1
|
||||
source-addressbook-backup-after = 2
|
||||
source-addressbook-stat-local-added-total = 1
|
||||
source-addressbook-stat-local-any-sent = 384
|
||||
source-addressbook-stat-local-any-received = 492
|
||||
source-addressbook-stat-remote-added-total = 1
|
||||
source-calendar-mode = slow
|
||||
source-calendar-first = true
|
||||
source-calendar-resume = false
|
||||
source-calendar-status = 0
|
||||
source-calendar-backup-before = 18
|
||||
source-calendar-backup-after = 18
|
||||
source-calendar-stat-local-any-sent = 2012
|
||||
source-calendar-stat-remote-added-total = 18
|
||||
source-memo-mode = slow
|
||||
source-memo-first = true
|
||||
source-memo-resume = false
|
||||
source-memo-status = 0
|
||||
source-memo-backup-before = 5
|
||||
source-memo-backup-after = 6
|
||||
source-memo-stat-local-added-total = 1
|
||||
source-memo-stat-local-any-sent = 132
|
||||
source-memo-stat-local-any-received = 19
|
||||
source-memo-stat-remote-added-total = 4
|
||||
source-todo-mode = slow
|
||||
source-todo-first = true
|
||||
source-todo-resume = false
|
||||
source-todo-status = 0
|
||||
source-todo-backup-before = 3
|
||||
source-todo-backup-after = 3
|
||||
source-todo-stat-local-any-sent = 141
|
||||
source-todo-stat-remote-added-total = 3
|
Loading…
Reference in a new issue