Do not use nova.test in placement.test_fault_wrap

The tests are very straightforward and do not require any of the setup
and fixtures that nova.test.NoDBTestCase supplies. Also, in the future
of placement extraction we don't want the dependecy.

By not using NoDBTestCase we lose a fixture that captures stderr output,
produced when the exception used by the tests is (intentionally) raised.
This adds slightly to the volume of output in test logs but is light
enough to not yet be a concern and adds some useful visibility.

We can explore adding such capturing back, as we create fixtures
specific to placement.

Partially implements blueprint placement-extract

Change-Id: Iba3455a7858badb34d4224429acb69273e6a88c4
This commit is contained in:
Chris Dent 2018-06-11 19:48:03 +01:00 committed by jichenjc
parent 01b9bc742d
commit 5787ab46d4
1 changed files with 2 additions and 2 deletions

View File

@ -15,10 +15,10 @@
import mock
from oslo_serialization import jsonutils
import testtools
import webob
from nova.api.openstack.placement import fault_wrap
from nova import test
ERROR_MESSAGE = 'that was not supposed to happen'
@ -28,7 +28,7 @@ class Fault(Exception):
pass
class TestFaultWrapper(test.NoDBTestCase):
class TestFaultWrapper(testtools.TestCase):
@staticmethod
@webob.dec.wsgify