Merge "[placement] Use oslotest CaptureOutput fixture"
This commit is contained in:
commit
391bca6db4
nova/tests/functional/api/openstack/placement
@ -12,6 +12,7 @@
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_config import fixture as config_fixture
|
||||
from oslotest import output
|
||||
import testtools
|
||||
|
||||
from nova.api.openstack.placement import context
|
||||
@ -48,7 +49,7 @@ class TestCase(testtools.TestCase):
|
||||
self.useFixture(policy_fixture.PlacementPolicyFixture())
|
||||
|
||||
self.useFixture(fixtures.StandardLogging())
|
||||
self.useFixture(fixtures.OutputStreamCapture())
|
||||
self.useFixture(output.CaptureOutput())
|
||||
# Filter ignorable warnings during test runs.
|
||||
self.useFixture(fixtures.WarningsFixture())
|
||||
|
||||
|
@ -17,6 +17,7 @@ from oslo_config import cfg
|
||||
from oslo_config import fixture as config_fixture
|
||||
from oslo_middleware import cors
|
||||
from oslo_utils import uuidutils
|
||||
from oslotest import output
|
||||
|
||||
from nova.api.openstack.placement import context
|
||||
from nova.api.openstack.placement import deploy
|
||||
@ -50,7 +51,7 @@ class APIFixture(fixture.GabbiFixture):
|
||||
# example database migrations).
|
||||
self.standard_logging_fixture = fixtures.StandardLogging()
|
||||
self.standard_logging_fixture.setUp()
|
||||
self.output_stream_fixture = fixtures.OutputStreamCapture()
|
||||
self.output_stream_fixture = output.CaptureOutput()
|
||||
self.output_stream_fixture.setUp()
|
||||
# Filter ignorable warnings during test runs.
|
||||
self.warnings_fixture = fixtures.WarningsFixture()
|
||||
|
@ -11,6 +11,7 @@
|
||||
# under the License.
|
||||
|
||||
import os
|
||||
from oslotest import output
|
||||
|
||||
import wsgi_intercept
|
||||
|
||||
@ -33,7 +34,7 @@ def load_tests(loader, tests, pattern):
|
||||
# These inner fixtures provide per test request output and log
|
||||
# capture, for cleaner results reporting.
|
||||
inner_fixtures = [
|
||||
nova_fixtures.OutputStreamCapture,
|
||||
output.CaptureOutput,
|
||||
nova_fixtures.StandardLogging,
|
||||
]
|
||||
return driver.build_tests(test_dir, loader, host=None,
|
||||
|
Loading…
x
Reference in New Issue
Block a user