Files
syn-chat-bot/.venv/lib/python3.9/site-packages/icalendar/tests/test_issue_116.py
Hyungi Ahn c2257d3a86 fix: 포트 충돌 회피 — note_bridge 8098, intent_service 8099
Jellyfin(8096), OrbStack(8097) 포트 충돌으로 변경.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 13:53:55 +09:00

29 lines
949 B
Python

import icalendar
def test_issue_116():
"""Issue #116/#117 - How to add 'X-APPLE-STRUCTURED-LOCATION'
https://github.com/collective/icalendar/issues/116
https://github.com/collective/icalendar/issues/117
"""
event = icalendar.Event()
event.add(
"X-APPLE-STRUCTURED-LOCATION",
"geo:-33.868900,151.207000",
parameters={
"VALUE": "URI",
"X-ADDRESS": "367 George Street Sydney CBD NSW 2000",
"X-APPLE-RADIUS": "72",
"X-TITLE": "367 George Street",
},
)
assert event.to_ical() == (
b"BEGIN:VEVENT\r\nX-APPLE-STRUCTURED-LOCATION;VALUE=URI;"
b'X-ADDRESS="367 George Street Sydney \r\n CBD NSW 2000";'
b'X-APPLE-RADIUS=72;X-TITLE="367 George Street":'
b"geo:-33.868900\r\n \\,151.207000\r\nEND:VEVENT\r\n"
)
# roundtrip
assert event.to_ical() == icalendar.Event.from_ical(event.to_ical()).to_ical()