mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-29 03:37:21 +00:00
More realistic test for ca8577a8dd
This commit is contained in:
@@ -520,20 +520,21 @@ class TestSetupActiveBsddClassification(NewFile):
|
|||||||
bpy.ops.bim.create_project()
|
bpy.ops.bim.create_project()
|
||||||
ifc_file = tool.Ifc.get()
|
ifc_file = tool.Ifc.get()
|
||||||
name = "CCI Construction"
|
name = "CCI Construction"
|
||||||
uri = "https://identifier.buildingsmart.org/uri/molio/cciconstruction/1.0"
|
base_uri = "https://identifier.buildingsmart.org/uri/molio/cciconstruction/1.0"
|
||||||
if schema == "IFC2X3":
|
if schema == "IFC2X3":
|
||||||
|
uri = "https://identifier.buildingsmart.org/uri/molio/cciconstruction/1.0/class/A-BDC"
|
||||||
classification = ifc_file.create_entity("IfcClassification", Name=name)
|
classification = ifc_file.create_entity("IfcClassification", Name=name)
|
||||||
ifc_file.create_entity("IfcClassificationReference", Location=uri, ReferencedSource=classification)
|
ifc_file.create_entity("IfcClassificationReference", Location=uri, ReferencedSource=classification)
|
||||||
else:
|
else:
|
||||||
attr_name = "Specification" if schema == "IFC4X3" else "Location"
|
attr_name = "Specification" if schema == "IFC4X3" else "Location"
|
||||||
classification = ifc_file.create_entity("IfcClassification", Name=name)
|
classification = ifc_file.create_entity("IfcClassification", Name=name)
|
||||||
setattr(classification, attr_name, uri)
|
setattr(classification, attr_name, base_uri)
|
||||||
filepath = "test/files/temp/test.ifc"
|
filepath = "test/files/temp/test.ifc"
|
||||||
ifc_file.write(filepath)
|
ifc_file.write(filepath)
|
||||||
bpy.ops.bim.load_project(filepath=filepath)
|
bpy.ops.bim.load_project(filepath=filepath)
|
||||||
props = bpy.context.scene.BIMBSDDProperties
|
props = bpy.context.scene.BIMBSDDProperties
|
||||||
assert props.active_domain == name
|
assert props.active_domain == name
|
||||||
assert props.active_uri == uri
|
assert props.active_uri == base_uri
|
||||||
|
|
||||||
def test_set_load_and_set_active_bsdd_ifc2x3(self):
|
def test_set_load_and_set_active_bsdd_ifc2x3(self):
|
||||||
self.run_test("IFC2X3")
|
self.run_test("IFC2X3")
|
||||||
|
|||||||
Reference in New Issue
Block a user