kopia lustrzana https://github.com/collective/icalendar
commit
cf9c6c8426
|
@ -18,7 +18,10 @@ New features:
|
|||
|
||||
Bug fixes:
|
||||
|
||||
- ...
|
||||
- vBoolean can now be used as an parameter
|
||||
Ref: #501
|
||||
Fixes: #500
|
||||
[jacadzaca]
|
||||
|
||||
|
||||
5.0.3 (2022-11-23)
|
||||
|
|
|
@ -102,7 +102,10 @@ def param_value(value):
|
|||
"""
|
||||
if isinstance(value, SEQUENCE_TYPES):
|
||||
return q_join(value)
|
||||
return dquote(value)
|
||||
elif isinstance(value, str):
|
||||
return dquote(value)
|
||||
else:
|
||||
return dquote(value.to_ical().decode(DEFAULT_ENCODING))
|
||||
|
||||
|
||||
# Could be improved
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
BEGIN:VEVENT
|
||||
ATTENDEE;RSVP=TRUE:mailto:someone@example.com
|
||||
END:VEVENT
|
|
@ -0,0 +1,9 @@
|
|||
from icalendar import Event, vBoolean, vCalAddress
|
||||
|
||||
def test_vBoolean_can_be_used_as_parameter_issue_500(events):
|
||||
'''https://github.com/collective/icalendar/issues/500'''
|
||||
attendee = vCalAddress(f'mailto:someone@example.com')
|
||||
attendee.params['rsvp'] = vBoolean(True)
|
||||
event = Event()
|
||||
event.add('attendee', attendee)
|
||||
assert event.to_ical() == events.event_with_rsvp.raw_ics
|
2
tox.ini
2
tox.ini
|
@ -32,7 +32,7 @@ commands_pre =
|
|||
# Install Plone and explicitly the single package that uses icalendar, plus the test runner.
|
||||
pip install Plone plone.app.event[test] zope.testrunner -c https://dist.plone.org/release/6.0-dev/constraints.txt
|
||||
# Install the dev version of the package, mostly so we can safely point to the path with the tests.
|
||||
pip install -e "git+https://github.com/plone/plone.app.event.git#egg=plone.app.event"
|
||||
pip install -e "git+https://github.com/plone/plone.app.event.git\#egg=plone.app.event"
|
||||
# icalendar is pinned in the constraints, but we want the current dev version.
|
||||
pip install -e {toxinidir}
|
||||
commands =
|
||||
|
|
Ładowanie…
Reference in New Issue