diff --git a/tests/test_caldav.py b/tests/test_caldav.py index 7bacdf5..a959a7c 100644 --- a/tests/test_caldav.py +++ b/tests/test_caldav.py @@ -828,6 +828,11 @@ class CalDAVSyncTests(unittest.TestCase): assert plan.destroy_data_executor is not None with patch("govoplan_calendar.backend.service.audit_event") as audit: plan.destroy_data_executor(session, "calendar") + # Retirement intentionally participates in the caller's database + # transaction. Commit before inspecting through a new Engine + # connection; otherwise SQLite rolls back the uncommitted DDL when + # the temporary inspector connection is returned to the pool. + session.commit() self.assertEqual(provider.deleted, [provider_ref]) self.assertEqual(provider.values, {})