mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-19 03:33:48 +00:00
Removing a person no longer has the potential to leave files in an invalid state
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import test.bootstrap
|
||||
import ifcopenshell.api
|
||||
|
||||
|
||||
class TestEditPerson(test.bootstrap.IFC4):
|
||||
def test_editing_a_person(self):
|
||||
person = self.file.createIfcPerson()
|
||||
ifcopenshell.api.run("owner.edit_person", self.file, person=person, attributes={
|
||||
"Identification": "Identification",
|
||||
"FamilyName": "FamilyName",
|
||||
"GivenName": "GivenName",
|
||||
"MiddleNames": ["Middle", "Names"],
|
||||
"PrefixTitles": ["Prefix", "Titles"],
|
||||
"SuffixTitles": ["Suffix", "Titles"],
|
||||
})
|
||||
assert person.Identification == "Identification"
|
||||
assert person.FamilyName == "FamilyName"
|
||||
assert person.GivenName == "GivenName"
|
||||
assert person.MiddleNames == ("Middle", "Names")
|
||||
assert person.PrefixTitles == ("Prefix", "Titles")
|
||||
assert person.SuffixTitles == ("Suffix", "Titles")
|
||||
Reference in New Issue
Block a user