summaryrefslogtreecommitdiff
path: root/nova/test.py
diff options
context:
space:
mode:
authorEric Fried <openstack@fried.cc>2019-09-27 11:04:57 -0500
committerEric Fried <openstack@fried.cc>2019-09-27 11:04:57 -0500
commita0398278765f2854595bfa8e232ae4b9a6860aaf (patch)
treeaba56f9c7632936baa4b191e621b0aaf2867a44f /nova/test.py
parent5617b1ae96d16fe5a8b4227c426782563e4f9f3e (diff)
downloadnova-a0398278765f2854595bfa8e232ae4b9a6860aaf.tar.gz
test cleanup: Use oslotest's CaptureOutput fixture
Nova had its own copy of oslotest's CaptureOutput fixture called OutputStreamCapture (probably predating the oslotest one, actually). DRY it up. A future change should be able to remove references to this fixture from nova.test.TestCase by inheriting from oslotest.base.BaseTestCase instead of testtools.TestCase. But we may or may not want to do the same for TestOSAPIFixture since that would pull in fixtures we don't care about (timeout and tempfile/tempdir). Change-Id: I18a5d621c9e414452852d4aeb0379be0d30af5df
Diffstat (limited to 'nova/test.py')
-rw-r--r--nova/test.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/test.py b/nova/test.py
index 433722e3dd..5f20110a36 100644
--- a/nova/test.py
+++ b/nova/test.py
@@ -47,6 +47,7 @@ from oslo_utils import timeutils
from oslo_versionedobjects import fixture as ovo_fixture
from oslotest import mock_fixture
from oslotest import moxstubout
+from oslotest import output
from oslotest import timeout
import six
from six.moves import builtins
@@ -188,8 +189,7 @@ class TestCase(testtools.TestCase):
self.useFixture(fixtures.TempHomeDir())
self.useFixture(log_fixture.get_logging_handle_error_fixture())
- self.output = nova_fixtures.OutputStreamCapture()
- self.useFixture(self.output)
+ self.output = self.useFixture(output.CaptureOutput())
self.stdlog = nova_fixtures.StandardLogging()
self.useFixture(self.stdlog)