test(calendar): commit retirement before engine inspection
This commit is contained in:
@@ -828,6 +828,11 @@ class CalDAVSyncTests(unittest.TestCase):
|
|||||||
assert plan.destroy_data_executor is not None
|
assert plan.destroy_data_executor is not None
|
||||||
with patch("govoplan_calendar.backend.service.audit_event") as audit:
|
with patch("govoplan_calendar.backend.service.audit_event") as audit:
|
||||||
plan.destroy_data_executor(session, "calendar")
|
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.deleted, [provider_ref])
|
||||||
self.assertEqual(provider.values, {})
|
self.assertEqual(provider.values, {})
|
||||||
|
|||||||
Reference in New Issue
Block a user