[cli, python-copr] [WIP] test coverage for cli, minor fixes for testability in both cli and python