def fake_attribute_obj(context, obj_attr_class=None, **updates): if obj_attr_class is None: obj_attr_class = objects.Attribute expected_attrs = updates.pop('expected_attrs', None) attribute = obj_attr_class._from_db_object(context, obj_attr_class(), fake_db_deployable(**updates), expected_attrs=expected_attrs) attribute.obj_reset_changes() return attribute
def fake_deployable2(self): db_deploy = fake_deployable.fake_db_deployable(id=2) return db_deploy