fix failing test in model module

it was failing because type object was hidden in viewport and was unselectable
This commit is contained in:
Andrej730
2024-08-21 15:23:08 +05:00
parent 85229fc865
commit 45fed747c2
+2 -4
View File
@@ -566,10 +566,8 @@ class TestApplyIfcMaterialChanges(NewFile):
# Occurrence with a style.
element_type_obj = tool.Ifc.get_object(element_type)
tool.Blender.set_objects_selection(
bpy.context, active_object=element_type_obj, selected_objects=[element_type_obj]
)
bpy.ops.bim.assign_style_to_selected(style_id=green_style.id())
with bpy.context.temp_override(selected_objects=[element_type_obj]):
bpy.ops.bim.assign_style_to_selected(style_id=green_style.id())
ifcopenshell.api.material.assign_material(ifc_file, material=red_material, products=[element_type])
tool.Material.ensure_material_assigned([element_type], material=red_material)