Merge "Fix NSX|v3 qos unit tests"
This commit is contained in:
commit
f3c16ccca3
@ -74,8 +74,6 @@ class TestQosNsxV3Notification(base.BaseQosTestCase,
|
|||||||
mock.patch('neutron.objects.db.api.create_object').start()
|
mock.patch('neutron.objects.db.api.create_object').start()
|
||||||
mock.patch('neutron.objects.db.api.update_object').start()
|
mock.patch('neutron.objects.db.api.update_object').start()
|
||||||
mock.patch('neutron.objects.db.api.delete_object').start()
|
mock.patch('neutron.objects.db.api.delete_object').start()
|
||||||
mock.patch(
|
|
||||||
'neutron.objects.qos.policy.QosPolicy.obj_load_attr').start()
|
|
||||||
mock.patch.object(nsx_db, 'get_switch_profile_by_qos_policy',
|
mock.patch.object(nsx_db, 'get_switch_profile_by_qos_policy',
|
||||||
return_value=self.fake_profile_id).start()
|
return_value=self.fake_profile_id).start()
|
||||||
|
|
||||||
@ -291,9 +289,7 @@ class TestQosNsxV3Notification(base.BaseQosTestCase,
|
|||||||
dscp=dscp_mark
|
dscp=dscp_mark
|
||||||
)
|
)
|
||||||
|
|
||||||
@mock.patch('neutron.objects.db.api.get_objects',
|
def test_rule_delete_profile(self):
|
||||||
return_value=[])
|
|
||||||
def test_rule_delete_profile(self, mock_objects):
|
|
||||||
# test the switch profile update when a QoS rule is deleted
|
# test the switch profile update when a QoS rule is deleted
|
||||||
_policy = policy_object.QosPolicy(
|
_policy = policy_object.QosPolicy(
|
||||||
self.ctxt, **self.policy_data['policy'])
|
self.ctxt, **self.policy_data['policy'])
|
||||||
@ -311,11 +307,11 @@ class TestQosNsxV3Notification(base.BaseQosTestCase,
|
|||||||
# validate the data on the profile
|
# validate the data on the profile
|
||||||
update_profile.assert_called_once_with(
|
update_profile.assert_called_once_with(
|
||||||
self.fake_profile_id,
|
self.fake_profile_id,
|
||||||
shaping_enabled=True,
|
shaping_enabled=False,
|
||||||
average_bandwidth=2,
|
average_bandwidth=None,
|
||||||
burst_size=19200,
|
burst_size=None,
|
||||||
dscp=0,
|
dscp=0,
|
||||||
peak_bandwidth=4,
|
peak_bandwidth=None,
|
||||||
qos_marking='trusted'
|
qos_marking='trusted'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user