Cli test

This Pull Request  builds up on the original request  for a test suite for CLI commands.
Also has a small fix for argument mismatch in haas/cli.py.
It's not obvious to me what this does or when it's called...  I would appreciate documentation that explains what's going on here.