'Run test mode and verify that resulting XML gets sent to the console.'

def test_console_output(self):

    console_out = io.BytesIO()
    with mock.patch('sys.stdout', console_out):
        args = ['--conf', self.default_config_file, 'test', os.path.join(self.fixtures_path, 'cmd-001.yaml')]
        self.execute_jenkins_jobs_with_args(args)
    xml_content = io.open(os.path.join(self.fixtures_path, 'cmd-001.xml'), 'r', encoding='utf-8').read()
    self.assertEqual(console_out.getvalue().decode('utf-8'), xml_content)
