Remove some hacks for bugs fixed in VObject 0.9.5

This commit is contained in:
Unrud 2017-07-01 00:10:56 +02:00
parent b25fcfcf10
commit 69086c6d70
2 changed files with 3 additions and 7 deletions

View File

@ -560,9 +560,7 @@ class BaseRequestsMixIn:
</C:comp-filter>
</C:comp-filter>"""], items=7)
assert "href>/calendar.ics/event6.ics</" not in answer
# HACK: VObject doesn't understand recurrence rules of event7.ics,
# it's always included.
# assert "href>/calendar.ics/event7.ics</" not in answer
assert "href>/calendar.ics/event7.ics</" not in answer
def test_time_range_filter_events_rrule(self):
"""Report request with time-range filter on events with rrules."""

View File

@ -283,10 +283,6 @@ def _visit_time_ranges(vobject_item, child_name, range_fn, infinity_fn):
"""
child = getattr(vobject_item, child_name.lower())
# TODO: Recurrences specified with RDATE
# (http://www.kanzaki.com/docs/ical/rdate.html) don't seem to work
# correct in VObject. getrruleset(addRDate=True) returns an empty generator
# if they are used.
# TODO: Single recurrences can be overwritten by components with
# RECURRENCE-ID (http://www.kanzaki.com/docs/ical/recurrenceId.html). They
# may overwrite the start and end time. Currently these components and
@ -298,9 +294,11 @@ def _visit_time_ranges(vobject_item, child_name, range_fn, infinity_fn):
first_dtstart = next(iter(child.getrruleset(addRDate=True)),
None)
except TypeError as e:
# TODO: The problem was fixed in VObject 0.9.5
raise VObjectBugException(
"failed to call getrruleset: %s" % e) from e
if first_dtstart is None:
# TODO: The problem was fixed in VObject 0.9.5
raise VObjectBugException(
"empty iterator from getrruleset")
if (hasattr(child, "rrule") and