'Unicode output from command'

def test_unicode_output(self):

    self.mocks.configure_mock('docker_client', {'exec_create.return_value': {'Id': 'container-foobar'}, 'exec_start.return_value': SAMPLE_UTF8_BYTES, 'exec_inspect.return_value': {'ExitCode': 0}})
    cmd = DockerBuildCommand(['echo', 'test'], cwd='/tmp/foobar')
    cmd.build_env = Mock()
    cmd.build_env.get_client.return_value = self.mocks.docker_client
    type(cmd.build_env).container_id = PropertyMock(return_value='foo')
    cmd.run()
    self.assertEqual(cmd.output, u'H\xe9r\xc9    \xee\xdf    s\xf6m\xea    \xfcn\xef\xe7\xf3\u2202\xe9')
    self.assertEqual(self.mocks.docker_client.exec_start.call_count, 1)
    self.assertEqual(self.mocks.docker_client.exec_create.call_count, 1)
    self.assertEqual(self.mocks.docker_client.exec_inspect.call_count, 1)
