'Run test mode simulating using pipes for input and output using
ascii encoding with unicode input'

def test_stream_input_output_ascii_encoding(self):

    console_out = io.BytesIO()
    console_out.encoding = 'ascii'
    input_file = os.path.join(self.fixtures_path, 'cmd-001.yaml')
    with io.open(input_file, 'r') as f:
        with mock.patch('sys.stdout', console_out):
            with mock.patch('sys.stdin', f):
                args = ['--conf', self.default_config_file, 'test']
                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()
    value = console_out.getvalue().decode('ascii')
    self.assertEqual(value, xml_content)
