Optimise create owner history to not rely on a person and organisation lookup, speeding up long procedures

This commit is contained in:
Dion Moult
2021-10-01 11:05:35 +10:00
parent 8bcec29429
commit 0a27308532
11 changed files with 92 additions and 107 deletions
@@ -0,0 +1,16 @@
import test.bootstrap
import ifcopenshell.api
class TestAddPerson(test.bootstrap.IFC4):
def test_adding_a_person(self):
person = ifcopenshell.api.run(
"owner.add_person",
self.file,
identification="Identification",
family_name="FamilyName",
given_name="GivenName",
)
assert person.Identification == "Identification"
assert person.FamilyName == "FamilyName"
assert person.GivenName == "GivenName"