Add test for mixed local DATE-TIME with time zone and UTC (Test #765)
This commit is contained in:
parent
233a54f73b
commit
18e4677cb7
29
radicale/tests/static/event9.ics
Normal file
29
radicale/tests/static/event9.ics
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
BEGIN:VCALENDAR
|
||||||
|
VERSION:2.0
|
||||||
|
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
|
||||||
|
BEGIN:VTIMEZONE
|
||||||
|
TZID:Europe/Paris
|
||||||
|
BEGIN:STANDARD
|
||||||
|
DTSTART;VALUE=DATE-TIME:19701025T030000
|
||||||
|
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
|
||||||
|
TZNAME:CET
|
||||||
|
TZOFFSETFROM:+0200
|
||||||
|
TZOFFSETTO:+0100
|
||||||
|
END:STANDARD
|
||||||
|
BEGIN:DAYLIGHT
|
||||||
|
DTSTART;VALUE=DATE-TIME:19700329T020000
|
||||||
|
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
|
||||||
|
TZNAME:CEST
|
||||||
|
TZOFFSETFROM:+0100
|
||||||
|
TZOFFSETTO:+0200
|
||||||
|
END:DAYLIGHT
|
||||||
|
END:VTIMEZONE
|
||||||
|
BEGIN:VEVENT
|
||||||
|
DTSTAMP:20170510T072956Z
|
||||||
|
UID:event9
|
||||||
|
SUMMARY:event9
|
||||||
|
DTSTART;VALUE=DATE-TIME;TZID=Europe/Paris:20170601T080000
|
||||||
|
DTEND;VALUE=DATE-TIME:20170601T080000Z
|
||||||
|
RRULE:FREQ=DAILY;UNTIL=20170602T060000Z
|
||||||
|
END:VEVENT
|
||||||
|
END:VCALENDAR
|
@ -869,28 +869,45 @@ class BaseRequestsMixIn:
|
|||||||
<C:comp-filter name="VEVENT">
|
<C:comp-filter name="VEVENT">
|
||||||
<C:time-range start="20170601T063000Z" end="20170601T070000Z"/>
|
<C:time-range start="20170601T063000Z" end="20170601T070000Z"/>
|
||||||
</C:comp-filter>
|
</C:comp-filter>
|
||||||
</C:comp-filter>"""], items=(6, 7, 8))
|
</C:comp-filter>"""], items=(6, 7, 8, 9))
|
||||||
assert "href>/calendar.ics/event6.ics</" in answer
|
assert "href>/calendar.ics/event6.ics</" in answer
|
||||||
assert "href>/calendar.ics/event7.ics</" in answer
|
assert "href>/calendar.ics/event7.ics</" in answer
|
||||||
assert "href>/calendar.ics/event8.ics</" in answer
|
assert "href>/calendar.ics/event8.ics</" in answer
|
||||||
|
assert "href>/calendar.ics/event9.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="20170701T060000Z"/>
|
<C:time-range start="20170701T060000Z"/>
|
||||||
</C:comp-filter>
|
</C:comp-filter>
|
||||||
</C:comp-filter>"""], items=(6, 7, 8))
|
</C:comp-filter>"""], items=(6, 7, 8, 9))
|
||||||
assert "href>/calendar.ics/event6.ics</" in answer
|
assert "href>/calendar.ics/event6.ics</" in answer
|
||||||
assert "href>/calendar.ics/event7.ics</" in answer
|
assert "href>/calendar.ics/event7.ics</" in answer
|
||||||
assert "href>/calendar.ics/event8.ics</" in answer
|
assert "href>/calendar.ics/event8.ics</" in answer
|
||||||
|
assert "href>/calendar.ics/event9.ics</" not 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="20170702T070000Z" end="20170704T060000Z"/>
|
<C:time-range start="20170702T070000Z" end="20170704T060000Z"/>
|
||||||
</C:comp-filter>
|
</C:comp-filter>
|
||||||
</C:comp-filter>"""], items=(6, 7, 8))
|
</C:comp-filter>"""], items=(6, 7, 8, 9))
|
||||||
assert "href>/calendar.ics/event6.ics</" not in answer
|
assert "href>/calendar.ics/event6.ics</" not in answer
|
||||||
assert "href>/calendar.ics/event7.ics</" not in answer
|
assert "href>/calendar.ics/event7.ics</" not in answer
|
||||||
assert "href>/calendar.ics/event8.ics</" not in answer
|
assert "href>/calendar.ics/event8.ics</" not in answer
|
||||||
|
assert "href>/calendar.ics/event9.ics</" not in answer
|
||||||
|
answer = self._test_filter(["""
|
||||||
|
<C:comp-filter name="VCALENDAR">
|
||||||
|
<C:comp-filter name="VEVENT">
|
||||||
|
<C:time-range start="20170602T075959Z" end="20170602T080000Z"/>
|
||||||
|
</C:comp-filter>
|
||||||
|
</C:comp-filter>"""], items=(9,))
|
||||||
|
assert "href>/calendar.ics/event9.ics</" in answer
|
||||||
|
answer = self._test_filter(["""
|
||||||
|
<C:comp-filter name="VCALENDAR">
|
||||||
|
<C:comp-filter name="VEVENT">
|
||||||
|
<C:time-range start="20170602T080000Z" end="20170603T083000Z"/>
|
||||||
|
</C:comp-filter>
|
||||||
|
</C:comp-filter>"""], items=(9,))
|
||||||
|
assert "href>/calendar.ics/event9.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…
x
Reference in New Issue
Block a user