#NEWLINE# def test_get_policy_bandwidth_limit_rules_for_policy( self ) : #NEWLINE# #INDENT# with mock . patch ( 'neutron.objects.qos.policy.QosPolicy.get_object' , return_value = self . policy ) : #NEWLINE# #INDENT# with mock . patch ( 'neutron.objects.qos.rule.QosBandwidthLimitRule.get_objects' ) as get_object_mock : #NEWLINE# #INDENT# self . qos_plugin . get_policy_bandwidth_limit_rules ( self . ctxt , self . policy . id ) #NEWLINE# get_object_mock . assert_called_once_with ( self . ctxt , qos_policy_id = self . policy . id )