2021-11-16 18:30:23 +11:00
|
|
|
import test.bootstrap
|
|
|
|
|
import ifcopenshell.api
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TestEditLibrary(test.bootstrap.IFC4):
|
|
|
|
|
def test_editing_a_library(self):
|
|
|
|
|
library = self.file.createIfcLibraryInformation()
|
2022-01-10 15:42:24 +11:00
|
|
|
ifcopenshell.api.run(
|
|
|
|
|
"library.edit_library",
|
|
|
|
|
self.file,
|
|
|
|
|
library=library,
|
|
|
|
|
attributes={
|
|
|
|
|
"Name": "Name",
|
|
|
|
|
"Version": "Version",
|
|
|
|
|
"VersionDate": "VersionDate",
|
|
|
|
|
"Location": "Location",
|
|
|
|
|
"Description": "Description",
|
|
|
|
|
},
|
|
|
|
|
)
|
2021-11-16 18:30:23 +11:00
|
|
|
assert library.Name == "Name"
|
|
|
|
|
assert library.Version == "Version"
|
|
|
|
|
assert library.VersionDate == "VersionDate"
|
|
|
|
|
assert library.Location == "Location"
|
|
|
|
|
assert library.Description == "Description"
|