Tests: refactor workflow helpers into a WorkflowTestCase class.
Fix assertion message in workflow chain updater.
Implement WorkflowSecurityUpdater.
Add a ``update_workflow_security`` helper function to the upgrade step.