fix agenda tests for new database internals