def delete_immutable(self, var: Variable, composite: Composite) -> None: if "immutable" not in composite.content: return if var.descends_from_list: self.delete_multiple(var, composite.content["immutable"]) else: composite.del_immutable(var.var_id)
def test_del_immutable(simple_composite: Composite): expected: Dict = { "first_name": "Steve", "gender": "male", "total_weight_gain": 3.9, "personal_summary": "Steve's favorite color is orange (FFA000). Over the observation period, he gained" " 3.9 lbs." } simple_composite.del_immutable("color_folder") assert simple_composite.content["immutable"] == expected