-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3f0af7b
commit 17c4058
Showing
3 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
BEGIN:VCALENDAR | ||
VERSION:2.0 | ||
PRODID:RESERVAS 1.0//EN | ||
BEGIN:VEVENT | ||
UID:210 | ||
DTSTART:20240901T120000Z | ||
DTEND:20240901T140000Z | ||
RRULE:FREQ=DAILY;INTERVAL=2;UNTIL=20250920 | ||
RDATE:20240924T090000Z | ||
SEQUENCE:0 | ||
SUMMARY:ORIGINAL EVENT | ||
END:VEVENT | ||
BEGIN:VEVENT | ||
UID:210 | ||
RECURRENCE-ID;RANGE=THISANDFUTURE:20240913T090000Z | ||
DTSTART:20240913T090000Z | ||
DTEND:20240913T160000Z | ||
SEQUENCE:1 | ||
SUMMARY:MODIFIED EVENT | ||
END:VEVENT | ||
BEGIN:VEVENT | ||
UID:210 | ||
RECURRENCE-ID;RANGE=THISANDFUTURE:20240923T090000Z | ||
DTSTART:20240923T090000Z | ||
DTEND:20240923T160000Z | ||
SEQUENCE:1 | ||
SUMMARY:EDITED EVENT | ||
END:VEVENT | ||
END:VCALENDAR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
"""This tests the range parameter for ics file. | ||
see https://github.com/niccokunzmann/python-recurring-ical-events/issues/75 | ||
""" | ||
|
||
import pytest | ||
|
||
|
||
@pytest.mark.parametrize( | ||
("date", "summary"), | ||
[ | ||
("20240901", "ORGINAL EVENT"), | ||
("20240911", "ORGINAL EVENT"), | ||
("20240913", "MODIFIED EVENT"), | ||
("20240915", "MODIFIED EVENT"), | ||
("20240917", "MODIFIED EVENT"), | ||
("20240919", "MODIFIED EVENT"), | ||
("20240921", "MODIFIED EVENT"), | ||
("20240923", "EDITED EVENT"), | ||
("20240924", "EDITED EVENT"), # RDATE | ||
("20240925", "EDITED EVENT"), | ||
], | ||
) | ||
def test_issue_75_RANGE_parameter(calendars, date, summary): | ||
events = calendars.issue_75_range_parameter.at(date) | ||
assert len(events) == 1, f"Expecting one event at {date}" | ||
event = events[0] | ||
assert event["SUMMARY"] == summary |