From 9fcb812ddb1cabfc7ba5b936621bd325caf7fd95 Mon Sep 17 00:00:00 2001 From: Albrecht Degering Date: Sat, 11 Jul 2026 00:13:13 +0200 Subject: [PATCH] Create scope tables in calendar backend tests --- tests/test_caldav.py | 2 ++ tests/test_sync_sources.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tests/test_caldav.py b/tests/test_caldav.py index 114a5fc..4d61614 100644 --- a/tests/test_caldav.py +++ b/tests/test_caldav.py @@ -28,6 +28,7 @@ from govoplan_calendar.backend.service import ( update_event, ) from govoplan_core.db.base import Base +from govoplan_core.tenancy.scope import create_scope_tables from govoplan_tenancy.backend.db.models import Tenant @@ -224,6 +225,7 @@ END:VCALENDAR class CalDAVSyncTests(unittest.TestCase): def setUp(self) -> None: self.engine = create_engine("sqlite:///:memory:") + create_scope_tables(self.engine) Base.metadata.create_all(bind=self.engine) self.Session = sessionmaker(bind=self.engine) diff --git a/tests/test_sync_sources.py b/tests/test_sync_sources.py index efbc639..0038ae4 100644 --- a/tests/test_sync_sources.py +++ b/tests/test_sync_sources.py @@ -13,12 +13,14 @@ from govoplan_calendar.backend.db.models import CalendarEvent from govoplan_calendar.backend.schemas import CalendarCollectionCreateRequest, CalendarEventCreateRequest, CalendarSyncSourceCreateRequest from govoplan_calendar.backend.service import CalendarError, create_calendar, create_event, create_sync_source, sync_source from govoplan_core.db.base import Base +from govoplan_core.tenancy.scope import create_scope_tables from govoplan_tenancy.backend.db.models import Tenant class CalendarSyncSourceTests(unittest.TestCase): def setUp(self) -> None: self.engine = create_engine("sqlite:///:memory:") + create_scope_tables(self.engine) Base.metadata.create_all(bind=self.engine) self.Session = sessionmaker(bind=self.engine)