debug VTODO and first tests running
This commit is contained in:
parent
7981e67d96
commit
a5d5cc8b2c
@ -304,8 +304,9 @@ def _time_range_match(vobject_item, filter_, child_name):
|
||||
completed = completed.value
|
||||
return start <= completed and end >= completed
|
||||
elif created is not None:
|
||||
# Line 7
|
||||
created = created.value
|
||||
return end < created
|
||||
return end > created
|
||||
else:
|
||||
return True
|
||||
|
||||
|
@ -20,6 +20,7 @@ RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
|
||||
END:STANDARD
|
||||
END:VTIMEZONE
|
||||
BEGIN:VTODO
|
||||
|
||||
DTSTART;TZID=Europe/Paris:20130901T180000
|
||||
DURATION:PT1H
|
||||
END:VTODO
|
||||
END:VCALENDAR
|
||||
|
@ -20,6 +20,7 @@ RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
|
||||
END:STANDARD
|
||||
END:VTIMEZONE
|
||||
BEGIN:VTODO
|
||||
|
||||
DTSTART;TZID=Europe/Paris:20130901T180000
|
||||
DUE;TZID=Europe/Paris:20130903T180000
|
||||
END:VTODO
|
||||
END:VCALENDAR
|
||||
|
@ -20,6 +20,6 @@ RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
|
||||
END:STANDARD
|
||||
END:VTIMEZONE
|
||||
BEGIN:VTODO
|
||||
|
||||
DTSTART;TZID=Europe/Paris:20130901T180000
|
||||
END:VTODO
|
||||
END:VCALENDAR
|
||||
|
@ -20,6 +20,6 @@ RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
|
||||
END:STANDARD
|
||||
END:VTIMEZONE
|
||||
BEGIN:VTODO
|
||||
|
||||
DUE;TZID=Europe/Paris:20130903T180000
|
||||
END:VTODO
|
||||
END:VCALENDAR
|
||||
|
@ -20,6 +20,7 @@ RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
|
||||
END:STANDARD
|
||||
END:VTIMEZONE
|
||||
BEGIN:VTODO
|
||||
|
||||
CREATED;TZID=Europe/Paris:20130903T180000
|
||||
COMPLETED;TZID=Europe/Paris:20130920T180000
|
||||
END:VTODO
|
||||
END:VCALENDAR
|
||||
|
25
tests/static/todo6.ics
Normal file
25
tests/static/todo6.ics
Normal file
@ -0,0 +1,25 @@
|
||||
BEGIN:VCALENDAR
|
||||
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
|
||||
VERSION:2.0
|
||||
BEGIN:VTIMEZONE
|
||||
TZID:Europe/Paris
|
||||
X-LIC-LOCATION:Europe/Paris
|
||||
BEGIN:DAYLIGHT
|
||||
TZOFFSETFROM:+0100
|
||||
TZOFFSETTO:+0200
|
||||
TZNAME:CEST
|
||||
DTSTART:19700329T020000
|
||||
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
|
||||
END:DAYLIGHT
|
||||
BEGIN:STANDARD
|
||||
TZOFFSETFROM:+0200
|
||||
TZOFFSETTO:+0100
|
||||
TZNAME:CET
|
||||
DTSTART:19701025T030000
|
||||
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
|
||||
END:STANDARD
|
||||
END:VTIMEZONE
|
||||
BEGIN:VTODO
|
||||
COMPLETED;TZID=Europe/Paris:20130920T180000
|
||||
END:VTODO
|
||||
END:VCALENDAR
|
25
tests/static/todo7.ics
Normal file
25
tests/static/todo7.ics
Normal file
@ -0,0 +1,25 @@
|
||||
BEGIN:VCALENDAR
|
||||
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
|
||||
VERSION:2.0
|
||||
BEGIN:VTIMEZONE
|
||||
TZID:Europe/Paris
|
||||
X-LIC-LOCATION:Europe/Paris
|
||||
BEGIN:DAYLIGHT
|
||||
TZOFFSETFROM:+0100
|
||||
TZOFFSETTO:+0200
|
||||
TZNAME:CEST
|
||||
DTSTART:19700329T020000
|
||||
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
|
||||
END:DAYLIGHT
|
||||
BEGIN:STANDARD
|
||||
TZOFFSETFROM:+0200
|
||||
TZOFFSETTO:+0100
|
||||
TZNAME:CET
|
||||
DTSTART:19701025T030000
|
||||
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
|
||||
END:STANDARD
|
||||
END:VTIMEZONE
|
||||
BEGIN:VTODO
|
||||
CREATED;TZID=Europe/Paris:20130803T180000
|
||||
END:VTODO
|
||||
END:VCALENDAR
|
25
tests/static/todo8.ics
Normal file
25
tests/static/todo8.ics
Normal file
@ -0,0 +1,25 @@
|
||||
BEGIN:VCALENDAR
|
||||
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
|
||||
VERSION:2.0
|
||||
BEGIN:VTIMEZONE
|
||||
TZID:Europe/Paris
|
||||
X-LIC-LOCATION:Europe/Paris
|
||||
BEGIN:DAYLIGHT
|
||||
TZOFFSETFROM:+0100
|
||||
TZOFFSETTO:+0200
|
||||
TZNAME:CEST
|
||||
DTSTART:19700329T020000
|
||||
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
|
||||
END:DAYLIGHT
|
||||
BEGIN:STANDARD
|
||||
TZOFFSETFROM:+0200
|
||||
TZOFFSETTO:+0100
|
||||
TZNAME:CET
|
||||
DTSTART:19701025T030000
|
||||
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
|
||||
END:STANDARD
|
||||
END:VTIMEZONE
|
||||
BEGIN:VTODO
|
||||
|
||||
END:VTODO
|
||||
END:VCALENDAR
|
@ -370,7 +370,37 @@ class BaseRequests:
|
||||
assert "href>/calendar.ics/event3.ics</" not in answer
|
||||
assert "href>/calendar.ics/event4.ics</" not in answer
|
||||
assert "href>/calendar.ics/event5.ics</" not in answer
|
||||
|
||||
|
||||
answer = self._test_filter(["""
|
||||
<C:comp-filter name="VCALENDAR">
|
||||
<C:comp-filter name="VTODO">
|
||||
<C:time-range start="20130801T000000Z" end="20131001T000000Z"/>
|
||||
</C:comp-filter>
|
||||
</C:comp-filter>"""],"todo", events=8)
|
||||
assert "href>/calendar.ics/todo1.ics</" in answer
|
||||
assert "href>/calendar.ics/todo2.ics</" in answer
|
||||
assert "href>/calendar.ics/todo3.ics</" in answer
|
||||
assert "href>/calendar.ics/todo4.ics</" in answer
|
||||
assert "href>/calendar.ics/todo5.ics</" in answer
|
||||
assert "href>/calendar.ics/todo6.ics</" in answer
|
||||
assert "href>/calendar.ics/todo7.ics</" in answer
|
||||
assert "href>/calendar.ics/todo8.ics</" in answer
|
||||
|
||||
answer = self._test_filter(["""
|
||||
<C:comp-filter name="VCALENDAR">
|
||||
<C:comp-filter name="VTODO">
|
||||
<C:time-range start="20130801T180000Z" end="20130801T000000Z"/>
|
||||
</C:comp-filter>
|
||||
</C:comp-filter>"""],"todo", events=8)
|
||||
assert "href>/calendar.ics/todo1.ics</" not in answer
|
||||
assert "href>/calendar.ics/todo2.ics</" not in answer
|
||||
assert "href>/calendar.ics/todo3.ics</" not in answer
|
||||
assert "href>/calendar.ics/todo4.ics</" not in answer
|
||||
assert "href>/calendar.ics/todo5.ics</" not in answer
|
||||
assert "href>/calendar.ics/todo6.ics</" not in answer
|
||||
assert "href>/calendar.ics/todo7.ics</" not in answer
|
||||
assert "href>/calendar.ics/todo8.ics</" in answer
|
||||
|
||||
|
||||
class TestMultiFileSystem(BaseRequests, BaseTest):
|
||||
"""Base class for filesystem tests."""
|
||||
|
Loading…
Reference in New Issue
Block a user