MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / test_assign_container

Method test_assign_container

src/ifcedit/tests/test_run.py:23–33  ·  view source on GitHub ↗
(self, model)

Source from the content-addressed store, hash-verified

21 assert result["result"]["type"] == "IfcBuildingElementProxy"
22
23 def test_assign_container(self, model):
24 wall = ifcopenshell.api.root.create_entity(model, ifc_class="IfcWall", name="TestWall2")
25 storey = model.by_type("IfcBuildingStorey")[0]
26 result = run_api(
27 model,
28 "spatial",
29 "assign_container",
30 {"products": str(wall.id()), "relating_structure": str(storey.id())},
31 )
32 assert result["ok"] is True
33 assert result["result"]["type"] == "IfcRelContainedInSpatialStructure"
34
35 def test_add_pset(self, model):
36 wall = model.by_type("IfcWall")[0]

Callers

nothing calls this directly

Calls 4

run_apiFunction · 0.90
create_entityMethod · 0.45
by_typeMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected