Skip to content

Commit

Permalink
add test from issue collective#464
Browse files Browse the repository at this point in the history
  • Loading branch information
jacadzaca committed Oct 23, 2022
1 parent f733db1 commit ee84df5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/icalendar/tests/events/issue_464_invalid_rdate.ics
@@ -0,0 +1,7 @@
BEGIN:VEVENT
SUMMARY:RDATE period
DTSTART:19961230T020000Z
DTEND:19961230T060000Z
UID:rdate_period
RDATE;VALUE=PERIOD:19970101T180000Z/19970102T070000Z,199709T180000Z/PT5H30M
END:VEVENT
Expand Up @@ -18,3 +18,11 @@ def test_dont_ignore_exceptions_on_broken_calendars_issue_104(calendars):
'''
with pytest.raises(ValueError):
calendars.issue_104_broken_calendar

def test_rdate_dosent_become_none_on_invalid_input_issue_464(events):
'''Issue #464 - [BUG] RDATE can become None if value is invalid
https://github.com/collective/icalendar/issues/464
'''
assert events.issue_464_invalid_rdate.is_broken
assert ('RDATE', 'Expected period format, got: 199709T180000Z/PT5H30M') in events.issue_464_invalid_rdate.errors
assert not b'RDATE:None' in events.issue_464_invalid_rdate.to_ical()

0 comments on commit ee84df5

Please sign in to comment.