Skip to content

tests: execute `addCleanup` cleanups with ZODB connection

Jérome Perrin requested to merge feat/test_addCleanup into master

unittest executes the cleanups after tearDown, after the ZODB connection is closed, so accessing database objects cause errors.

According to python unittest documentation, it is safe to call doCleanups ourselves when we need the cleanup to be executed earlier, this is a typical case where we want the cleanup to be called before closing the database connections.

Merge request reports