chore: sync GovOPlaN module split state

This commit is contained in:
2026-07-10 12:51:18 +02:00
parent c3c867391c
commit 15d5613f9b
20 changed files with 4704 additions and 902 deletions

View File

@@ -92,6 +92,7 @@ END:VCALENDAR
self.assertEqual(event["start_at"], datetime(2026, 7, 8, 7, 0, tzinfo=timezone.utc))
self.assertEqual(event["end_at"], datetime(2026, 7, 8, 8, 30, tzinfo=timezone.utc))
self.assertEqual(event["duration_seconds"], 5400)
self.assertTrue(event["icalendar"]["standard"]["uses_duration"])
self.assertEqual(event["description"], "Line one\nLine two")
self.assertEqual(event["location"], "Room; 1")
self.assertEqual(event["timezone"], "Europe/Berlin")
@@ -164,6 +165,38 @@ END:VCALENDAR
self.assertIn("BEGIN:VALARM", ics)
self.assertIn("TRIGGER:-PT15M", ics)
def test_generated_ics_preserves_duration_when_source_used_duration(self) -> None:
event = SimpleNamespace(
uid="event-duration@example.test",
start_at=datetime(2026, 7, 8, 7, 0, tzinfo=timezone.utc),
end_at=datetime(2026, 7, 8, 8, 30, tzinfo=timezone.utc),
duration_seconds=5400,
all_day=False,
timezone="Europe/Berlin",
summary="Duration",
sequence=0,
status="CONFIRMED",
transparency="OPAQUE",
classification="PUBLIC",
description=None,
location=None,
categories=[],
rrule=None,
organizer=None,
attendees=[],
rdate=[],
exdate=[],
reminders=[],
attachments=[],
related_to=[],
icalendar={"standard": {"uses_duration": True}},
)
ics = event_to_ics(event)
self.assertIn("DURATION:PT1H30M", ics)
self.assertNotIn("DTEND", ics)
def test_expand_event_occurrences_applies_rrule_rdate_and_exdate(self) -> None:
parsed = parse_vevent(
"""BEGIN:VCALENDAR