mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 06:58:56 +00:00
fix material core tests after 58a7ef6
This commit is contained in:
@@ -22,16 +22,26 @@ from test.core.bootstrap import ifc, material, style, spatial
|
|||||||
|
|
||||||
class TestAddMaterial:
|
class TestAddMaterial:
|
||||||
def test_add_a_material(self, ifc, material):
|
def test_add_a_material(self, ifc, material):
|
||||||
ifc.run("material.add_material", name="name").should_be_called().will_return("material")
|
ifc.run(
|
||||||
|
"material.add_material", name="name", category="category", description="description"
|
||||||
|
).should_be_called().will_return("material")
|
||||||
material.is_editing_materials().should_be_called().will_return(False)
|
material.is_editing_materials().should_be_called().will_return(False)
|
||||||
assert subject.add_material(ifc, material, name="name") == "material"
|
assert (
|
||||||
|
subject.add_material(ifc, material, name="name", category="category", description="description")
|
||||||
|
== "material"
|
||||||
|
)
|
||||||
|
|
||||||
def test_reloading_imported_materials_if_you_are_editing_scene_materials(self, ifc, material):
|
def test_reloading_imported_materials_if_you_are_editing_scene_materials(self, ifc, material):
|
||||||
ifc.run("material.add_material", name="name").should_be_called().will_return("material")
|
ifc.run(
|
||||||
|
"material.add_material", name="name", category="category", description="description"
|
||||||
|
).should_be_called().will_return("material")
|
||||||
material.is_editing_materials().should_be_called().will_return(True)
|
material.is_editing_materials().should_be_called().will_return(True)
|
||||||
material.get_active_material_type().should_be_called().will_return("material_type")
|
material.get_active_material_type().should_be_called().will_return("material_type")
|
||||||
material.import_material_definitions("material_type").should_be_called()
|
material.import_material_definitions("material_type").should_be_called()
|
||||||
assert subject.add_material(ifc, material, name="name") == "material"
|
assert (
|
||||||
|
subject.add_material(ifc, material, name="name", category="category", description="description")
|
||||||
|
== "material"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class TestAddMaterialSet:
|
class TestAddMaterialSet:
|
||||||
|
|||||||
Reference in New Issue
Block a user