diff options
author | Tobias Brox <tobias@redpill-linpro.com> | 2021-11-10 00:24:07 +0000 |
---|---|---|
committer | Tobias Brox <tobias@redpill-linpro.com> | 2021-11-10 00:24:07 +0000 |
commit | 72e303264d7347a2d9bdf6dddb618eb72b747d56 (patch) | |
tree | dbb2fa3a21cc846df6a32bea6002c59e70dade64 | |
parent | 5826f5409c140129c2025dc6f4dfa38b06c11f0c (diff) | |
download | python-caldav-72e303264d7347a2d9bdf6dddb618eb72b747d56.zip |
got all tests passing towards nextcloud
-rw-r--r-- | caldav/objects.py | 8 | ||||
-rw-r--r-- | tests/compatibility_issues.py | 9 | ||||
-rw-r--r-- | tests/conf_private.py.EXAMPLE | 2 | ||||
-rw-r--r-- | tests/test_caldav.py | 3 |
4 files changed, 19 insertions, 3 deletions
diff --git a/caldav/objects.py b/caldav/objects.py index 211091b..ff4f7ea 100644 --- a/caldav/objects.py +++ b/caldav/objects.py @@ -434,7 +434,13 @@ class Principal(DAVObject): @property def calendar_home_set(self): if not self._calendar_home_set: - self.calendar_home_set = self.get_property(cdav.CalendarHomeSet()) + calendar_home_set_url = self.get_property(cdav.CalendarHomeSet()) + ## owncloud returns remote.php/dav/calendars/tobixen@e.email/ + ## in that case the @ should be quoted. Perhaps other + ## implentations returns already quoted URLs. Hacky workaround: + if '@' in calendar_home_set_url and not '://' in calendar_home_set_url: + calendar_home_set_url = quote(calendar_home_set_url) + self.calendar_home_set = calendar_home_set_url return self._calendar_home_set @calendar_home_set.setter diff --git a/tests/compatibility_issues.py b/tests/compatibility_issues.py index 9785ffe..37162b5 100644 --- a/tests/compatibility_issues.py +++ b/tests/compatibility_issues.py @@ -26,6 +26,9 @@ incompatibility_description = { 'no_recurring_todo': """Recurring events are supported, but not recurring todos""", + 'no_recurring_todo_expand': + """Recurring todos aren't expanded""", + 'no_scheduling': """RFC6833 is not supported""", @@ -246,3 +249,9 @@ sogo = [ "no_expand", ## https://www.sogo.nu/bugs/view.php?id=3065 "vtodo_datesearch_nodtstart_task_is_skipped", ] + +nextcloud = [ + 'no_sync_token', + 'no_recurring_todo', + 'no_recurring_todo_expand', +] diff --git a/tests/conf_private.py.EXAMPLE b/tests/conf_private.py.EXAMPLE index e87cf87..75ef931 100644 --- a/tests/conf_private.py.EXAMPLE +++ b/tests/conf_private.py.EXAMPLE @@ -23,7 +23,7 @@ caldav_servers = [ ## incompatibilities is a list of flags that can be set for ## skipping (parts) of certain tests. See ## tests/compatibility_issues.py for premade lists - #incompatibilities = compatibility_issues.icloud + #'incompatibilities': compatibility_issues.nextcloud 'incompatibilities': [] } ] diff --git a/tests/test_caldav.py b/tests/test_caldav.py index 2c81264..f251b02 100644 --- a/tests/test_caldav.py +++ b/tests/test_caldav.py @@ -1159,7 +1159,8 @@ class RepeatedFunctionalTestsBaseClass(object): ## verify that "expand" works if ( not self.check_compatibility_flag('no_recurring_expandation') and - not self.check_compatibility_flag('no_expand')): + not self.check_compatibility_flag('no_expand') and + not self.check_compatibility_flag('no_recurring_todo_expand')): assert_equal(len([x for x in todos if 'DTSTART:20020415T1330' in x.data]), 1) ## exercise the default for expand (maybe -> False for open-ended search) todos = c.date_search( |