def setUp(self): super(TestDeleteNetworkQosRuleBandwidthLimit, self).setUp() attrs = { 'qos_policy_id': self.qos_policy.id, 'type': RULE_TYPE_BANDWIDTH_LIMIT } self.new_rule = network_fakes.FakeNetworkQosRule.create_one_qos_rule( attrs) self.qos_policy.rules = [self.new_rule] self.network.delete_qos_bandwidth_limit_rule = mock.Mock( return_value=None) self.network.find_qos_bandwidth_limit_rule = ( network_fakes.FakeNetworkQosRule.get_qos_rules( qos_rules=self.new_rule)) # Get the command object to test self.cmd = network_qos_rule.DeleteNetworkQosRule( self.app, self.namespace)
def setUp(self): super(TestDeleteNetworkQosRuleDSCPMarking, self).setUp() attrs = { 'qos_policy_id': self.qos_policy.id, 'type': RULE_TYPE_DSCP_MARKING } self.new_rule = network_fakes.FakeNetworkQosRule.create_one_qos_rule( attrs) self.qos_policy.rules = [self.new_rule] self.network.delete_qos_dscp_marking_rule = mock.Mock( return_value=None) self.network.find_qos_dscp_marking_rule = ( network_fakes.FakeNetworkQosRule.get_qos_rules( qos_rules=self.new_rule)) # Get the command object to test self.cmd = network_qos_rule.DeleteNetworkQosRule( self.app, self.namespace)