Reconcile "test/utils.py" implementations
Before we move this code to a more suitable place, start by agreeing with small differences in the implementation.
This takes all the nice changes from caddy-frontend/tests/ but not what was specific to caddy or to testing slave instances.