Merge "python3: python3 binary/text data compatbility"

This commit is contained in:
Jenkins 2013-06-03 12:21:47 +00:00 committed by Gerrit Code Review
commit 74733fc3fe
1 changed files with 5 additions and 4 deletions

View File

@ -19,9 +19,10 @@ from __future__ import print_function
import fixtures
import os
import StringIO
import tempfile
from six import StringIO
from openstack.common import processutils
from tests import utils
@ -213,7 +214,7 @@ class FakeSshChannel(object):
return self.rc
class FakeSshStream(StringIO.StringIO):
class FakeSshStream(StringIO):
def setup_channel(self, rc):
self.channel = FakeSshChannel(rc)
@ -225,9 +226,9 @@ class FakeSshConnection(object):
def exec_command(self, cmd):
stdout = FakeSshStream('stdout')
stdout.setup_channel(self.rc)
return (StringIO.StringIO(),
return (StringIO(),
stdout,
StringIO.StringIO('stderr'))
StringIO('stderr'))
class SshExecuteTestCase(utils.BaseTestCase):