Skip to content

Commit

Permalink
tests showing that the event is not moved
Browse files Browse the repository at this point in the history
see #62
  • Loading branch information
niccokunzmann committed Dec 23, 2021
1 parent f418b6c commit 7597dd0
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 0 deletions.
59 changes: 59 additions & 0 deletions test/calendars/issue-62-moved-event.ics
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME:Partyborn Zeitgeist
X-WR-TIMEZONE:Europe/Berlin
X-WR-CALDESC:Alle Events des Zeitgeist Paderborn für den Partyborn Partyala
rm\nhttps://partyborn.de/partyalarm
BEGIN:VTIMEZONE
TZID:Europe/Berlin
X-LIC-LOCATION:Europe/Berlin
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
DTSTART;TZID=Europe/Berlin:20211217T213000
DTSTAMP:20211218T004508Z
UID:38m812jicsrer5gorh3mlp7qhc@google.com
RECURRENCE-ID;TZID=Europe/Berlin:20211231T213000
CREATED:20211218T004036Z
DESCRIPTION:Jeden letzten Freitag im Monat <a href="https://www.instagram.c
om/p/CWwxmqbKXsC/">https://www.instagram.com/p/CWwxmqbKXsC/</a>
LAST-MODIFIED:20211218T004234Z
LOCATION:
SEQUENCE:3
STATUS:CONFIRMED
SUMMARY:Karaoke
TRANSP:TRANSPARENT
END:VEVENT
BEGIN:VEVENT
DTSTART;TZID=Europe/Berlin:20211126T213000
DTEND;TZID=Europe/Berlin:20211126T213000
RRULE:FREQ=MONTHLY;BYDAY=-1FR
DTSTAMP:20211218T004508Z
UID:38m812jicsrer5gorh3mlp7qhc@google.com
CREATED:20211218T004036Z
DESCRIPTION:Jeden letzten Freitag im Monat <a href="https://www.instagram.c
om/p/CWwxmqbKXsC/">https://www.instagram.com/p/CWwxmqbKXsC/</a>
LAST-MODIFIED:20211218T004214Z
LOCATION:
SEQUENCE:2
STATUS:CONFIRMED
SUMMARY:Karaoke
TRANSP:TRANSPARENT
END:VEVENT
END:VCALENDAR
19 changes: 19 additions & 0 deletions test/test_issue_62_moved_event.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
'''
This tests the move of a december event.
Issue: https://github.com/niccokunzmann/python-recurring-ical-events/issues/62
'''

def test_event_is_absent(calendars):
'''RRULE:FREQ=MONTHLY;BYDAY=-1FR'''
events = calendars.issue_62_moved_event.at("20211231")
assert events == []

def test_event_has_moved(calendars):
'''DTSTART;TZID=Europe/Berlin:20211217T213000'''
events = calendars.issue_62_moved_event.at("20211217")
assert len(events) == 1




0 comments on commit 7597dd0

Please sign in to comment.