From 7597dd0e865c5ffec96b0dfe65a96ac12eda57ac Mon Sep 17 00:00:00 2001 From: Nicco Kunzmann Date: Thu, 23 Dec 2021 11:56:56 +0000 Subject: [PATCH] tests showing that the event is not moved see https://github.com/niccokunzmann/python-recurring-ical-events/issues/62 --- test/calendars/issue-62-moved-event.ics | 59 +++++++++++++++++++++++++ test/test_issue_62_moved_event.py | 19 ++++++++ 2 files changed, 78 insertions(+) create mode 100644 test/calendars/issue-62-moved-event.ics create mode 100644 test/test_issue_62_moved_event.py diff --git a/test/calendars/issue-62-moved-event.ics b/test/calendars/issue-62-moved-event.ics new file mode 100644 index 0000000..40308d9 --- /dev/null +++ b/test/calendars/issue-62-moved-event.ics @@ -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 https://www.instagram.com/p/CWwxmqbKXsC/ +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 https://www.instagram.com/p/CWwxmqbKXsC/ +LAST-MODIFIED:20211218T004214Z +LOCATION: +SEQUENCE:2 +STATUS:CONFIRMED +SUMMARY:Karaoke +TRANSP:TRANSPARENT +END:VEVENT +END:VCALENDAR \ No newline at end of file diff --git a/test/test_issue_62_moved_event.py b/test/test_issue_62_moved_event.py new file mode 100644 index 0000000..c425c86 --- /dev/null +++ b/test/test_issue_62_moved_event.py @@ -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 + + + +