Skip to content

Commit

Permalink
Merge pull request #406 from jacadzaca/test_restructure_issue_70
Browse files Browse the repository at this point in the history
Test restructure issue 70
  • Loading branch information
niccokunzmann authored Sep 24, 2022
2 parents 11591c0 + a5045d0 commit 99b2be8
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
BEGIN:VEVENT
CREATED:20081114T072804Z
UID:D449CA84-00A3-4E55-83E1-34B58268853B
DTEND:20070220T180000
RRULE:FREQ=WEEKLY;INTERVAL=1;UNTIL=20070619T225959
TRANSP:OPAQUE
SUMMARY:Esb mellon phone conf
DTSTART:20070220T170000
DTSTAMP:20070221T095412Z
SEQUENCE:0
END:VEVENT

25 changes: 0 additions & 25 deletions src/icalendar/tests/test_fixed_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,31 +83,6 @@ def test_issue_64(self):
b"DTSTART;VALUE=DATE-TIME:20120903T000000\r\nEND:VEVENT\r\n"
)

def test_issue_70(self):
"""Issue #70 - e.decode("RRULE") causes Attribute Error
https://github.com/collective/icalendar/issues/70
"""

ical_str = """BEGIN:VEVENT
CREATED:20081114T072804Z
UID:D449CA84-00A3-4E55-83E1-34B58268853B
DTEND:20070220T180000
RRULE:FREQ=WEEKLY;INTERVAL=1;UNTIL=20070619T225959
TRANSP:OPAQUE
SUMMARY:Esb mellon phone conf
DTSTART:20070220T170000
DTSTAMP:20070221T095412Z
SEQUENCE:0
END:VEVENT"""

cal = icalendar.Calendar.from_ical(ical_str)
recur = cal.decoded("RRULE")
self.assertIsInstance(recur, icalendar.vRecur)
self.assertEqual(
recur.to_ical(),
b'FREQ=WEEKLY;UNTIL=20070619T225959;INTERVAL=1'
)

def test_issue_82(self):
"""Issue #82 - vBinary __repr__ called rather than to_ical from
container types
Expand Down
10 changes: 10 additions & 0 deletions src/icalendar/tests/test_parsing.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
'''Tests checking that parsing works'''
from icalendar import vRecur

def test_decode_rrule_attribute_error_issue_70(events):
# Issue #70 - e.decode("RRULE") causes Attribute Error
# see https://github.com/collective/icalendar/issues/70
recur = events.issue_70_rrule_causes_attribute_error.decoded('RRULE')
assert isinstance(recur, vRecur)
assert recur.to_ical() == b'FREQ=WEEKLY;UNTIL=20070619T225959;INTERVAL=1'

def test_description_parsed_properly_issue_53(events):
'''Issue #53 - Parsing failure on some descriptions?
Expand Down

0 comments on commit 99b2be8

Please sign in to comment.