From 934c9e1485300c0cafb0213f61c0b0f627fa61f2 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Wed, 18 Jun 2025 18:38:14 +0500 Subject: [PATCH] test_edit_organisation - add ifc4x3 tests --- .../test/api/owner/test_edit_organisation.py | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/ifcopenshell-python/test/api/owner/test_edit_organisation.py b/src/ifcopenshell-python/test/api/owner/test_edit_organisation.py index 65eb525a73..c1a6742239 100644 --- a/src/ifcopenshell-python/test/api/owner/test_edit_organisation.py +++ b/src/ifcopenshell-python/test/api/owner/test_edit_organisation.py @@ -23,20 +23,23 @@ import ifcopenshell.api.owner class TestEditOrganisation(test.bootstrap.IFC4): def test_editing_a_organisation(self): organisation = self.file.createIfcOrganization() + attributes = { + "Identification" if self.file.schema != "IFC2X3" else "Id": "Identification", + "Name": "Name", + "Description": "Description", + } ifcopenshell.api.owner.edit_organisation( self.file, organisation=organisation, - attributes={ - "Identification" if self.file.schema != "IFC2X3" else "Id": "Identification", - "Name": "Name", - "Description": "Description", - }, + attributes=attributes, ) - # 0 IfcOrganization Identification(>IFC2X3) / Id (IFC2X3) - assert organisation[0] == "Identification" - assert organisation.Name == "Name" - assert organisation.Description == "Description" + for attr, value in attributes.items(): + assert getattr(organisation, attr) == value class TestEditOrganisationIFC2X3(test.bootstrap.IFC2X3, TestEditOrganisation): pass + + +class TestEditOrganisationIFC4X3(test.bootstrap.IFC4X3, TestEditOrganisation): + pass