mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 14:31:39 +00:00
See #2140. You can now bulk unassign aggregates, and they are auto directly contained in any previous indirect containers.
This commit is contained in:
@@ -50,9 +50,11 @@ class TestAssignObject:
|
||||
|
||||
|
||||
class TestUnassignObject:
|
||||
def test_run(self, ifc, collector):
|
||||
ifc.get_entity("related_obj").should_be_called().will_return("related_object")
|
||||
ifc.run("aggregate.unassign_object", product="related_object").should_be_called().will_return("rel")
|
||||
def test_run(self, ifc, aggregate, collector):
|
||||
ifc.get_entity("related_obj").should_be_called().will_return("element")
|
||||
aggregate.get_container("element").should_be_called().will_return("container")
|
||||
ifc.run("spatial.assign_container", product="element", relating_structure="container").should_be_called()
|
||||
ifc.run("aggregate.unassign_object", product="element").should_be_called().will_return("rel")
|
||||
collector.assign("relating_obj").should_be_called()
|
||||
collector.assign("related_obj").should_be_called()
|
||||
assert subject.unassign_object(ifc, collector, relating_obj="relating_obj", related_obj="related_obj") == "rel"
|
||||
subject.unassign_object(ifc, aggregate, collector, relating_obj="relating_obj", related_obj="related_obj")
|
||||
|
||||
Reference in New Issue
Block a user