kopia lustrzana https://github.com/collective/icalendar
commit
4bbb44ed25
|
@ -18,7 +18,7 @@ New features:
|
|||
|
||||
Bug fixes:
|
||||
|
||||
- ...
|
||||
- Fix problem with ORGANIZER in FREE/BUSY #348
|
||||
|
||||
5.0.4 (2022-12-29)
|
||||
------------------
|
||||
|
|
|
@ -337,6 +337,8 @@ class Contentline(str):
|
|||
if not name:
|
||||
raise ValueError('Key name is required')
|
||||
validate_token(name)
|
||||
if not value_split:
|
||||
value_split = i + 1
|
||||
if not name_split or name_split + 1 == value_split:
|
||||
raise ValueError('Invalid content line')
|
||||
params = Parameters.from_ical(st[name_split + 1: value_split],
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
BEGIN:VCALENDAR
|
||||
CALSCALE:GREGORIAN
|
||||
METHOD:PUBLISH
|
||||
VERSION:2.0
|
||||
PRODID:-//Sixt//RAC//EN
|
||||
BEGIN:VFREEBUSY
|
||||
FREEBUSY;FBTYPE=FREE:20190624T063000Z/20190624T163000Z
|
||||
ORGANIZER;CN=Sixt SE
|
||||
X-ORGANIZER2;CN=Sixt SE;CN2=Test!
|
||||
UID:SIXT_9879691160
|
||||
DTSTAMP:20190612T104813Z
|
||||
END:VFREEBUSY
|
||||
BEGIN:VEVENT
|
||||
CLASS:PUBLIC
|
||||
DESCRIPTION:\nVotre véhicule avec le numéro de réservation xxxxxxxxxxx sera à votre disposition le 24.06.2019 à 08:30 heures (heure locale). Retour prévu : Ferney-Voltaire AP de Genève Cointrin Sect(F), le 24.06.2019 à 18:30 heures.\nVous trouverez des informations relatives à la modification ou à l'annulation de votre réservation sous http://www.sixt.fr\n
|
||||
DTSTART:20190624T063000Z
|
||||
DTSTAMP:20190612T104813Z
|
||||
DTEND:20190624T163000Z
|
||||
LOCATION:Sixt Genève Aéroport secteur France, AP de Genève Cointrin Sect(F), 01210 Ferney-Voltaire, FR
|
||||
PRIORITY:5
|
||||
TRANSP:TRANSPARENT
|
||||
SEQUENCE:0
|
||||
STATUS:CONFIRMED
|
||||
SUMMARY:Sixt : détails de votre réservation
|
||||
UID:SIXT_9879691160
|
||||
BEGIN:VALARM
|
||||
TRIGGER:-PT30M
|
||||
ACTION:DISPLAY
|
||||
DESCRIPTION:\nLe véhicule avec la n° de réservation xxxxxxxxxxx sera à votre disposition entre 24.06.2019 et 08:30 heures (heure locale) à l'agence Genève Aéroport secteur France. Retour prévu : Ferney-Voltaire AP de Genève Cointrin Sect(F), le 24.06.2019 à 18:30 heures.\nTrouver des informations de localisation et modifier / annuler votre réservation ici: http://www.sixt.fr\n
|
||||
END:VALARM
|
||||
END:VEVENT
|
||||
END:VCALENDAR
|
|
@ -0,0 +1,23 @@
|
|||
"""These are tests for Issue #348
|
||||
|
||||
see https://github.com/collective/icalendar/issues/348
|
||||
"""
|
||||
|
||||
|
||||
def test_calendar_can_be_parsed_correctly(calendars):
|
||||
"""Exception when there's no ':' when parsing value #348
|
||||
|
||||
see https://github.com/collective/icalendar/issues/348
|
||||
"""
|
||||
freebusy = calendars.issue_348_exception_parsing_value.walk("VFREEBUSY")[0]
|
||||
assert freebusy["ORGANIZER"].params["CN"] == "Sixt SE"
|
||||
|
||||
|
||||
def test_parameters_are_not_truncated(calendars):
|
||||
"""We skip to the end and we do not want to loose parameters.
|
||||
|
||||
see https://github.com/collective/icalendar/pull/514#issuecomment-1505878801
|
||||
"""
|
||||
freebusy = calendars.issue_348_exception_parsing_value.walk("VFREEBUSY")[0]
|
||||
assert freebusy["X-ORGANIZER2"].params["CN"] == "Sixt SE"
|
||||
assert freebusy["X-ORGANIZER2"].params["CN2"] == "Test!"
|
Ładowanie…
Reference in New Issue