From d7d107a8cc6c7fda482a2dcfa40b7b439229e35f Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 13 Jul 2010 15:05:27 +0000 Subject: [PATCH] Monotone-Parent: 56f698136f13cc3f35b72d19695a8a4606cb1c72 Monotone-Revision: 16e84a4b9506eba9d39a96290c969eda838704a2 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-07-13T15:05:27 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 5 +++++ Tests/Integration/test-webdavsync.py | 13 ++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) 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()