'Run test mode and verify that failed Jenkins connection attempt
exception does not bubble out of cmd.main. Ideally, we would also test
that an appropriate message is logged to stderr but it\'s somewhat
difficult to figure out how to actually enable stderr in this test
suite.'

@mock.patch('jenkins.Jenkins.get_plugins')
def test_console_output_jenkins_connection_failure_warning(self, get_plugins_mock):

    get_plugins_mock.side_effect = jenkins.JenkinsException('Connection    refused')
    with mock.patch('sys.stdout'):
        try:
            args = ['--conf', self.default_config_file, 'test', os.path.join(self.fixtures_path, 'cmd-001.yaml')]
            self.execute_jenkins_jobs_with_args(args)
        except jenkins.JenkinsException:
            self.fail('jenkins.JenkinsException    propagated    to    main')
        except:
            pass
