Removing a person no longer has the potential to leave files in an invalid state

This commit is contained in:
Dion Moult
2021-10-01 12:35:46 +10:00
parent 0a27308532
commit 915fa9f9b0
9 changed files with 240 additions and 0 deletions
@@ -0,0 +1,11 @@
import test.bootstrap
import ifcopenshell.api
class TestRemoveAddress(test.bootstrap.IFC4):
def test_removing_an_address(self):
postal = self.file.createIfcPostalAddress()
telecom = self.file.createIfcTelecomAddress()
ifcopenshell.api.run("owner.remove_address", self.file, address=postal)
ifcopenshell.api.run("owner.remove_address", self.file, address=telecom)
assert len(self.file.by_type("IfcAddress")) == 0