Merge "stop patching RbacNeutronDbObjectMixin"

This commit is contained in:
Zuul 2018-11-21 01:09:16 +00:00 committed by Gerrit Code Review
commit e125c61245
2 changed files with 4 additions and 9 deletions

View File

@ -94,9 +94,7 @@ class TestQosNsxV3Notification(base.BaseQosTestCase,
self.nsxlib = v3_utils.get_nsxlib_wrapper()
@mock.patch(
'neutron.objects.rbac_db.RbacNeutronDbObjectMixin'
'.create_rbac_policy')
@mock.patch.object(QoSPolicy, 'create_rbac_policy')
@mock.patch.object(nsx_db, 'add_qos_policy_profile_mapping')
def test_policy_create_profile(self, fake_db_add, fake_rbac_create):
# test the switch profile creation when a QoS policy is created
@ -121,9 +119,7 @@ class TestQosNsxV3Notification(base.BaseQosTestCase,
# verify that the policy->profile mapping entry was added
self.assertTrue(fake_db_add.called)
@mock.patch(
'neutron.objects.rbac_db.RbacNeutronDbObjectMixin'
'.create_rbac_policy')
@mock.patch.object(QoSPolicy, 'create_rbac_policy')
def __test_policy_update_profile(self, *mocks):
# test the switch profile update when a QoS policy is updated
fields = base_object.get_updatable_fields(

View File

@ -280,9 +280,8 @@ class TestQosNsxVNotification(test_plugin.NsxVPluginV2TestCase,
with mock.patch('neutron.services.qos.qos_plugin.QoSPlugin.'
'get_policy',
return_value=_policy) as rules_mock,\
mock.patch('neutron.objects.qos.policy.'
'QosPolicy.get_object',
return_value=_policy),\
mock.patch.object(QosPolicy, 'get_object',
return_value=_policy),\
mock.patch.object(self.ctxt.session, 'expunge'):
# create the network to use this policy
net = self._create_net()