Monotone-Parent: becba1041ad050a1189effa1d6444a31a7727dc3

Monotone-Revision: 342a840830ca9a56c37f7c05d3a5defaf3099bb7

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2009-12-22T20:35:19
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2009-12-22 20:35:19 +00:00
parent 0dccddb87b
commit d73757c3ad
2 changed files with 11 additions and 6 deletions

View File

@ -1,5 +1,9 @@
2009-12-22 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* 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

View File

@ -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()