mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 02:23:34 +00:00
Replace all ifcopenshell.api.run with ifcopenshell.api static functions.
This commit is contained in:
@@ -18,7 +18,8 @@
|
||||
|
||||
import pytest
|
||||
import test.bootstrap
|
||||
import ifcopenshell.api
|
||||
import ifcopenshell.api.root
|
||||
import ifcopenshell.api.type
|
||||
import ifcopenshell.util.brick as subject
|
||||
|
||||
|
||||
@@ -34,7 +35,7 @@ class TestGetBrickTypeIFC4(test.bootstrap.IFC4):
|
||||
|
||||
class TestGetBrickTypeIFC2X3(test.bootstrap.IFC2X3):
|
||||
def test_run(self):
|
||||
element = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcFlowController")
|
||||
type_element = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcAirTerminalBoxType")
|
||||
ifcopenshell.api.run("type.assign_type", self.file, related_objects=[element], relating_type=type_element)
|
||||
element = ifcopenshell.api.root.create_entity(self.file, ifc_class="IfcFlowController")
|
||||
type_element = ifcopenshell.api.root.create_entity(self.file, ifc_class="IfcAirTerminalBoxType")
|
||||
ifcopenshell.api.type.assign_type(self.file, related_objects=[element], relating_type=type_element)
|
||||
assert subject.get_brick_type(element) == "https://brickschema.org/schema/Brick#TerminalUnit"
|
||||
|
||||
Reference in New Issue
Block a user