kopia lustrzana https://github.com/collective/icalendar
improve test for issue #27
rodzic
ccc3810630
commit
1b44560e9f
|
@ -0,0 +1,21 @@
|
|||
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
|
||||
FREEBUSY;FBTYPE=BUSY:20120113T130000Z/20120113T150000Z
|
||||
FREEBUSY;FBTYPE=BUSY:20120116T130000Z/20120116T150000Z
|
||||
FREEBUSY;FBTYPE=BUSY:20120117T091500Z/20120117T101500Z
|
||||
FREEBUSY;FBTYPE=BUSY:20120118T160000Z/20120118T163000Z
|
||||
FREEBUSY;FBTYPE=BUSY:20120124T083000Z/20120124T093000Z
|
||||
FREEBUSY;FBTYPE=BUSY:20120124T123000Z/20120124T143000Z
|
||||
FREEBUSY;FBTYPE=BUSY:20120131T091500Z/20120131T101500Z
|
||||
END:VFREEBUSY
|
||||
END:VCALENDAR
|
|
@ -5,7 +5,10 @@
|
|||
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
|
||||
|
||||
|
||||
free_busy = list(calendars.issue_27_multiple_periods_in_freebusy_multiple_freebusies.walk('VFREEBUSY'))[0]
|
||||
free_busy_period = free_busy['freebusy']
|
||||
print(free_busy['freebusy'])
|
||||
equivalent_way_of_defining_free_busy = list(calendars.issue_27_multiple_periods_in_freebusy_one_freebusy.walk('VFREEBUSY'))[0]
|
||||
free_busy_period_equivalent = equivalent_way_of_defining_free_busy['freebusy']
|
||||
assert free_busy_period == free_busy_period_equivalent
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue