Test time range filtering with RDATE
This commit is contained in:
parent
c54196bb72
commit
db572e91f8
33
radicale/tests/static/event7.ics
Normal file
33
radicale/tests/static/event7.ics
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
BEGIN:VCALENDAR
|
||||||
|
VERSION:2.0
|
||||||
|
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
|
||||||
|
BEGIN:VTIMEZONE
|
||||||
|
TZID:Europe/Paris
|
||||||
|
BEGIN:STANDARD
|
||||||
|
DTSTART:19701025T030000
|
||||||
|
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
|
||||||
|
TZNAME:CET
|
||||||
|
TZOFFSETFROM:+0200
|
||||||
|
TZOFFSETTO:+0100
|
||||||
|
END:STANDARD
|
||||||
|
BEGIN:DAYLIGHT
|
||||||
|
DTSTART:19700329T020000
|
||||||
|
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
|
||||||
|
TZNAME:CEST
|
||||||
|
TZOFFSETFROM:+0100
|
||||||
|
TZOFFSETTO:+0200
|
||||||
|
END:DAYLIGHT
|
||||||
|
END:VTIMEZONE
|
||||||
|
BEGIN:VEVENT
|
||||||
|
UID:event7
|
||||||
|
DTSTART;TZID=Europe/Paris:20170601T080000
|
||||||
|
DTEND;TZID=Europe/Paris:20170601T090000
|
||||||
|
CREATED:20170601T060000Z
|
||||||
|
DTSTAMP:20170601T060000Z
|
||||||
|
LAST-MODIFIED:20170601T060000Z
|
||||||
|
RDATE;TZID=Europe/Paris:20170701T080000
|
||||||
|
SUMMARY:event7
|
||||||
|
TRANSP:OPAQUE
|
||||||
|
X-MOZ-GENERATION:1
|
||||||
|
END:VEVENT
|
||||||
|
END:VCALENDAR
|
@ -547,17 +547,21 @@ class BaseRequestsMixIn:
|
|||||||
<C:comp-filter name="VEVENT">
|
<C:comp-filter name="VEVENT">
|
||||||
<C:time-range start="20170701T060000Z"/>
|
<C:time-range start="20170701T060000Z"/>
|
||||||
</C:comp-filter>
|
</C:comp-filter>
|
||||||
</C:comp-filter>"""], items=6)
|
</C:comp-filter>"""], items=7)
|
||||||
# HACK: VObject doesn't match RECURRENCE-ID to recurrences, the
|
# HACK: VObject doesn't match RECURRENCE-ID to recurrences, the
|
||||||
# overwritten recurrence is still used for filtering.
|
# overwritten recurrence is still used for filtering.
|
||||||
assert "href>/calendar.ics/event6.ics</" in answer
|
assert "href>/calendar.ics/event6.ics</" in answer
|
||||||
|
assert "href>/calendar.ics/event7.ics</" in answer
|
||||||
answer = self._test_filter(["""
|
answer = self._test_filter(["""
|
||||||
<C:comp-filter name="VCALENDAR">
|
<C:comp-filter name="VCALENDAR">
|
||||||
<C:comp-filter name="VEVENT">
|
<C:comp-filter name="VEVENT">
|
||||||
<C:time-range start="20170701T080000Z"/>
|
<C:time-range start="20170701T080000Z"/>
|
||||||
</C:comp-filter>
|
</C:comp-filter>
|
||||||
</C:comp-filter>"""], items=6)
|
</C:comp-filter>"""], items=7)
|
||||||
assert "href>/calendar.ics/event6.ics</" not in answer
|
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
|
||||||
|
|
||||||
def test_time_range_filter_events_rrule(self):
|
def test_time_range_filter_events_rrule(self):
|
||||||
"""Report request with time-range filter on events with rrules."""
|
"""Report request with time-range filter on events with rrules."""
|
||||||
|
Loading…
Reference in New Issue
Block a user