QoS unit tests - fix deprecation warning
The QoS unit tests through warnings about illegal UUID This patch fixed it. Change-Id: Ie496125d2385d6282bc67e5b9f69a983b38d0856
This commit is contained in:
parent
f0bea7fead
commit
0daccfebf0
@ -147,6 +147,8 @@ class TestQosNsxV3Notification(nsxlib_testcase.NsxClientTestCase,
|
|||||||
return_value=_policy):
|
return_value=_policy):
|
||||||
with mock.patch.object(nsxlib,
|
with mock.patch.object(nsxlib,
|
||||||
'update_qos_switching_profile_shaping') as update_profile:
|
'update_qos_switching_profile_shaping') as update_profile:
|
||||||
|
with mock.patch('neutron.objects.db.api.update_object',
|
||||||
|
return_value=self.rule_data):
|
||||||
self.qos_plugin.update_policy_bandwidth_limit_rule(
|
self.qos_plugin.update_policy_bandwidth_limit_rule(
|
||||||
self.ctxt, self.rule.id, _policy.id, self.rule_data)
|
self.ctxt, self.rule.id, _policy.id, self.rule_data)
|
||||||
|
|
||||||
@ -185,6 +187,8 @@ class TestQosNsxV3Notification(nsxlib_testcase.NsxClientTestCase,
|
|||||||
return_value=_policy):
|
return_value=_policy):
|
||||||
with mock.patch.object(nsxlib,
|
with mock.patch.object(nsxlib,
|
||||||
'update_qos_switching_profile_shaping') as update_profile:
|
'update_qos_switching_profile_shaping') as update_profile:
|
||||||
|
with mock.patch('neutron.objects.db.api.update_object',
|
||||||
|
return_value=rule_data):
|
||||||
self.qos_plugin.update_policy_bandwidth_limit_rule(
|
self.qos_plugin.update_policy_bandwidth_limit_rule(
|
||||||
self.ctxt, rule.id, _policy.id, rule_data)
|
self.ctxt, rule.id, _policy.id, rule_data)
|
||||||
|
|
||||||
|
@ -101,8 +101,10 @@ class TestQosNsxVNotification(test_plugin.NsxVPluginV2TestCase,
|
|||||||
self._rules = [self.rule_data['bandwidth_limit_rule']]
|
self._rules = [self.rule_data['bandwidth_limit_rule']]
|
||||||
self._dscp_rules = [self.dscp_rule_data['dscp_marking_rule']]
|
self._dscp_rules = [self.dscp_rule_data['dscp_marking_rule']]
|
||||||
|
|
||||||
mock.patch('neutron.objects.db.api.create_object').start()
|
mock.patch('neutron.objects.db.api.create_object',
|
||||||
mock.patch('neutron.objects.db.api.update_object').start()
|
return_value=self.rule_data).start()
|
||||||
|
mock.patch('neutron.objects.db.api.update_object',
|
||||||
|
return_value=self.rule_data).start()
|
||||||
mock.patch('neutron.objects.db.api.delete_object').start()
|
mock.patch('neutron.objects.db.api.delete_object').start()
|
||||||
mock.patch('neutron.objects.db.api.get_object').start()
|
mock.patch('neutron.objects.db.api.get_object').start()
|
||||||
mock.patch(
|
mock.patch(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user