perf: batch scheduling reconciliation and add widget

This commit is contained in:
2026-07-29 14:16:29 +02:00
parent 60b01e5a16
commit b9f557e95b
7 changed files with 290 additions and 32 deletions

View File

@@ -93,6 +93,23 @@ from govoplan_scheduling.backend.runtime import configure_runtime
class SchedulingServiceTests(unittest.TestCase):
def setUp(self) -> None:
fixed_now = datetime(2026, 7, 19, 12, tzinfo=timezone.utc)
self.now_patches = (
patch(
"govoplan_scheduling.backend.service._now",
return_value=fixed_now,
),
patch(
"govoplan_poll.backend.service._now",
return_value=fixed_now,
),
patch(
"govoplan_poll.backend.participation_service._now",
return_value=fixed_now,
),
)
for now_patch in self.now_patches:
now_patch.start()
registry = PlatformRegistry()
registry.register(get_poll_manifest())
registry.register(get_calendar_manifest())
@@ -125,6 +142,8 @@ class SchedulingServiceTests(unittest.TestCase):
self.session: Session = self.Session()
def tearDown(self) -> None:
for now_patch in reversed(self.now_patches):
now_patch.stop()
self.session.close()
Base.metadata.drop_all(
self.engine,