def test_tutum_version(self, mock_exit, mock_add_arg): initialize_parser() mock_add_arg.assert_any_call('-v', '--version', action='version', version='%(prog)s ' + tutumcli.__version__)
def compare_output(self, output, args): parser = initialize_parser() argv = patch_help_option(args) parser.parse_args(argv) out = self.buf.getvalue() self.buf.truncate(0) self.assertEqual(' '.join(output.split()), ' '.join(out.split()))