Replace fixtures.DetailStream with fixtures.StringStream.

Fixtures 0.3.12 adds StringStream as a successor to DetailStream (this
change was made for compatibility with python 3). Update Nova's tests to
use StringStream instead of DetailStream.

Change-Id: If697859a52f3a7db9dab38bd080b779bb3270287
This commit is contained in:
Clark Boylan
2012-12-16 17:31:46 -08:00
parent d74c3ce134
commit db85287358

View File

@@ -193,11 +193,11 @@ class TestCase(testtools.TestCase):
if (os.environ.get('OS_STDOUT_NOCAPTURE') != 'True' and
os.environ.get('OS_STDOUT_NOCAPTURE') != '1'):
stdout = self.useFixture(fixtures.DetailStream('stdout')).stream
stdout = self.useFixture(fixtures.StringStream('stdout')).stream
self.useFixture(fixtures.MonkeyPatch('sys.stdout', stdout))
if (os.environ.get('OS_STDERR_NOCAPTURE') != 'True' and
os.environ.get('OS_STDERR_NOCAPTURE') != '1'):
stderr = self.useFixture(fixtures.DetailStream('stderr')).stream
stderr = self.useFixture(fixtures.StringStream('stderr')).stream
self.useFixture(fixtures.MonkeyPatch('sys.stderr', stderr))
self.log_fixture = self.useFixture(fixtures.FakeLogger('nova'))