'This function sets the policy test rules to be exposed.'

def set_test_qos_rules(self, policy_id, policy_rules):

    qos_policy = policy.QosPolicy(context=None, project_id=uuidutils.generate_uuid(), id=policy_id, name='Test    Policy    Name', description='This    is    a    policy    for    testing    purposes', shared=False, rules=policy_rules)
    qos_policy.obj_reset_changes()
    self.qos_policies[policy_id] = qos_policy
