Fix mock.patch.stopall issue with ovsdbapp
After I876919dfc1fa0ae36bd99e3d760e38d207ee6ef3, two test classes that inherit from both neutron's oslotest-based base classes and ovsdbapp's unittest-based base class would fail due to mock.patch.stopall being called twice. This appears to be because of some special handling in oslotest addCleanup that checks a private _cleanups variable before adding a cleanup to stopall. Changing the order of the imports so that neutron can register its cleanups first seems to fix the issue. Closes-Bug: #1878708 Change-Id: I5b3812a9765a37b3e66d6c8ca0cb42ee1b7a2b9a
This commit is contained in:
parent
cb55643a06
commit
ccb0cddd4a
|
@ -24,8 +24,8 @@ from neutron.tests.functional import base as n_base
|
|||
from neutron.tests.functional.resources.ovsdb import events
|
||||
|
||||
|
||||
class TestSbApi(base.FunctionalTestCase,
|
||||
n_base.BaseLoggingTestCase):
|
||||
class TestSbApi(n_base.BaseLoggingTestCase,
|
||||
base.FunctionalTestCase):
|
||||
schemas = ['OVN_Southbound', 'OVN_Northbound']
|
||||
|
||||
def setUp(self):
|
||||
|
|
|
@ -599,8 +599,8 @@ class TestExternalPorts(base.TestOVNFunctionalBase):
|
|||
self._test_external_port_update_switchdev(portbindings.VNIC_MACVTAP)
|
||||
|
||||
|
||||
class TestCreateDefaultDropPortGroup(ovs_base.FunctionalTestCase,
|
||||
base.BaseLoggingTestCase):
|
||||
class TestCreateDefaultDropPortGroup(base.BaseLoggingTestCase,
|
||||
ovs_base.FunctionalTestCase):
|
||||
schemas = ['OVN_Southbound', 'OVN_Northbound']
|
||||
PG_NAME = ovn_const.OVN_DROP_PORT_GROUP_NAME
|
||||
|
||||
|
|
Loading…
Reference in New Issue