From 22f5ed62fef337f9fa2f84318e3c24962ee3c207 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Wed, 25 Jun 2014 10:14:28 -0400 Subject: [PATCH] Fixed tests regarding default permissions on CalDAV collections --- Tests/Integration/test-davacl.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Tests/Integration/test-davacl.py b/Tests/Integration/test-davacl.py index a254f25f9..a8a1a5bac 100755 --- a/Tests/Integration/test-davacl.py +++ b/Tests/Integration/test-davacl.py @@ -401,7 +401,17 @@ class DAVCalendarAclTest(DAVAclTest): else: expStatus = 207 privileges = self._currentUserPrivilegeSet(self.resource, expStatus) - self._comparePrivilegeSets(expectedPrivileges, privileges) + + # When comparing privileges on DAV collection, we remove all 'default' + # privileges on the collection. + privileges_set = set(privileges); + for x in ("public", "private", "confidential"): + privileges_set.discard("{urn:inverse:params:xml:ns:inverse-dav}viewwhole-%s-records" % x) + privileges_set.discard("{urn:inverse:params:xml:ns:inverse-dav}viewdant-%s-records" % x) + privileges_set.discard("{urn:inverse:params:xml:ns:inverse-dav}modify-%s-records" % x) + privileges_set.discard("{urn:inverse:params:xml:ns:inverse-dav}respondto-%s-records" %x) + + self._comparePrivilegeSets(expectedPrivileges, list(privileges_set)) def _testEventDAVAcl(self, event_class, right, error_code): icsClass = self.classToICSClass[event_class].lower()