mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 06:21:40 +00:00
New feature to conveniently add a default material in a blank project when none exists.
This commit is contained in:
@@ -24,3 +24,11 @@ class TestUnlinkMaterial:
|
||||
def test_run(self, material):
|
||||
material.unlink("obj").should_be_called()
|
||||
subject.unlink_material(material, 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()
|
||||
assert subject.add_default_material(ifc, material) == "obj"
|
||||
|
||||
Reference in New Issue
Block a user