From d73757c3ad7f8b8166e5296962cec9e23f371dac Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 22 Dec 2009 20:35:19 +0000 Subject: [PATCH] Monotone-Parent: becba1041ad050a1189effa1d6444a31a7727dc3 Monotone-Revision: 342a840830ca9a56c37f7c05d3a5defaf3099bb7 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-12-22T20:35:19 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ++++ Tests/test-webdav.py | 13 +++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6078f135a..eb1e428de 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2009-12-22 Wolfgang Sourdeau + * Tests/test-webdav.py (WebDAVTest.testPrincipalCollectionSet2): + fixed test to use the proper collection URL as expected value, + rather that the freebusy.ifb resource URL. + * SoObjects/Appointments/SOGoAppointmentFolder.m (_appendComponentProperties:matchingFilters:toResponse:) (_appendComponentProperties:matchingURLs:toResponse:): ensure that diff --git a/Tests/test-webdav.py b/Tests/test-webdav.py index d8cb79663..14e45cf70 100755 --- a/Tests/test-webdav.py +++ b/Tests/test-webdav.py @@ -7,7 +7,7 @@ import webdavlib class WebDAVTest(unittest.TestCase): def testPrincipalCollectionSet(self): - """property: principal-collection-set""" + """property: 'principal-collection-set' on collection object""" client = webdavlib.WebDAVClient(hostname, port, username, password) resource = '/SOGo/dav/%s/' % username propfind = webdavlib.WebDAVPROPFIND(resource, @@ -29,7 +29,7 @@ class WebDAVTest(unittest.TestCase): % ( responseHref, resource )) def testPrincipalCollectionSet2(self): - """property: principal-collection-set""" + """property: 'principal-collection-set' on non-collection object""" client = webdavlib.WebDAVClient(hostname, port, username, password) resource = '/SOGo/dav/%s/freebusy.ifb' % username propfind = webdavlib.WebDAVPROPFIND(resource, @@ -41,14 +41,15 @@ class WebDAVTest(unittest.TestCase): nodes = propfind.xpath_evaluate('/D:multistatus/D:response/D:propstat/D:prop/D:principal-collection-set/D:href', None) responseHref = nodes[0].childNodes[0].nodeValue + expectedHref = '/SOGo/dav/%s/' % username if responseHref[0:4] == "http": - self.assertEquals("http://%s%s" % (hostname, resource), responseHref, + self.assertEquals("http://%s%s" % (hostname, expectedHref), responseHref, "{DAV:}principal-collection-set returned %s instead of '%s'" - % ( responseHref, resource )) + % ( responseHref, expectedHref )) else: - self.assertEquals(resource, responseHref, + self.assertEquals(expectedHref, responseHref, "{DAV:}principal-collection-set returned %s instead of '%s'" - % ( responseHref, resource )) + % ( responseHref, expectedHref )) if __name__ == "__main__": unittest.main()