This:
- Aligns all tests to use json format output so the assertion check is simpler (no tampering with caplog record)
- Simplify the caplog record assertion check in failure scenarios
- Drop dead code
- Rename tests with a test_cli_ prefix so it's simpler to run them separately from
the rest