mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 21:42:19 +00:00
Fix bug where an added default material was not linked and auto synced.
This commit is contained in:
@@ -21,14 +21,14 @@ from test.core.bootstrap import ifc, material
|
||||
|
||||
|
||||
class TestUnlinkMaterial:
|
||||
def test_run(self, material):
|
||||
material.unlink("obj").should_be_called()
|
||||
subject.unlink_material(material, obj="obj")
|
||||
def test_run(self, ifc):
|
||||
ifc.unlink(obj="obj").should_be_called()
|
||||
subject.unlink_material(ifc, obj="obj")
|
||||
|
||||
|
||||
class TestAddDefaultMaterial:
|
||||
def test_run(self, ifc, material):
|
||||
material.add_default_material_object().should_be_called().will_return("obj")
|
||||
ifc.run("material.add_material", name="Default").should_be_called().will_return("material")
|
||||
material.link("material", "obj").should_be_called()
|
||||
ifc.link("material", "obj").should_be_called()
|
||||
assert subject.add_default_material(ifc, material) == "obj"
|
||||
|
||||
Reference in New Issue
Block a user