perf: batch scheduling reconciliation and add widget
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user