def test_getting_a_linked_style(self): tool.Ifc.set(ifcopenshell.file()) style = tool.Ifc.get().createIfcSurfaceStyle() obj = bpy.data.materials.new("Material") obj.BIMMaterialProperties.ifc_style_id = style.id() assert subject.get_style(obj) == style
def test_getting_nothing_for_a_broken_link_style(self): obj = bpy.data.materials.new("Material") obj.BIMMaterialProperties.ifc_style_id = 1 assert subject.get_style(obj) == None
def test_getting_no_style(self): assert subject.get_style(bpy.data.materials.new("Material")) is None