Add tests to reproduce issue #27

issue-27
Nicco Kunzmann 2023-08-30 17:49:55 +01:00
rodzic 6c53290043
commit 032a553d56
2 zmienionych plików z 25 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,14 @@
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//davmail.sf.net/NONSGML DavMail Calendar V1.1//EN
METHOD:REPLY
BEGIN:VFREEBUSY
DTSTAMP:20120131T123000Z
ORGANIZER:MAILTO:organizer@domain.tld
DTSTART:20120101T000000Z
DTEND:20120201T000000Z
UID:null
ATTENDEE:MAILTO:attendee@domain.tld
FREEBUSY;FBTYPE=BUSY:20120103T091500Z/20120103T101500Z,20120113T130000Z/20120113T150000Z,20120116T130000Z/20120116T150000Z,20120117T091500Z/20120117T101500Z,20120118T160000Z/20120118T163000Z,20120124T083000Z/20120124T093000Z,20120124T123000Z/20120124T143000Z,20120131T091500Z/20120131T101500Z
END:VFREEBUSY
END:VCALENDAR

Wyświetl plik

@ -0,0 +1,11 @@
'''Issue #27 - multiple periods
https://github.com/collective/icalendar/issues/27
'''
from icalendar import Calendar
def test_issue_27_multiple_periods(calendars):
free_busy = list(calendars.issue_27_multiple_periods.walk('VFREEBUSY'))
assert len(free_busy) == 1