diff --git a/ChangeLog b/ChangeLog index 627c9024a..402adcb0a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-07-13 Wolfgang Sourdeau + + * Tests/Integration/test-webdavsync.py (WebdavSyncTest.test): + adapted to suit the new handling of empty collections in SOGo + 2010-07-09 Francis Lachapelle * UI/WebServerResources/UIxAttendeesEditor.js (onContactKeydown): diff --git a/Tests/Integration/test-webdavsync.py b/Tests/Integration/test-webdavsync.py index 4fb44bd83..be38865da 100755 --- a/Tests/Integration/test-webdavsync.py +++ b/Tests/Integration/test-webdavsync.py @@ -51,13 +51,16 @@ class WebdavSyncTest(unittest.TestCase): self.assertTrue(token > 0) self.assertTrue(token <= int(query1.start)) - # we make sure that any token is invalid when the collection is empty + # we make sure that any token is acceoted when the collection is + # empty, but that the returned token differs query2 = webdavlib.WebDAVSyncQuery(resource, "1234", [ "getetag" ]) self.client.execute(query2) - self.assertEquals(query2.response["status"], 403) - cond_nodes = query2.response["document"].find("{DAV:}valid-sync-token") - self.assertTrue(cond_nodes is not None, - "expected 'valid-sync-token' condition error") + self.assertEquals(query2.response["status"], 207) + token_node = query2.response["document"].find("{DAV:}sync-token") + self.assertTrue(token_node is not None, + "expected 'sync-token' tag") + token = int(token_node.text) + self.assertTrue(token > 0) if __name__ == "__main__": unittest.main()