mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 05:52:33 +00:00
document.unassign_document - support batching #4474
This commit is contained in:
@@ -113,4 +113,4 @@ def assign_document(ifc, product=None, document=None):
|
||||
|
||||
|
||||
def unassign_document(ifc, product=None, document=None):
|
||||
ifc.run("document.unassign_document", product=product, document=document)
|
||||
ifc.run("document.unassign_document", products=[product], document=document)
|
||||
|
||||
@@ -265,7 +265,7 @@ def duplicate_drawing(ifc, drawing_tool, drawing=None, should_duplicate_annotati
|
||||
ifc.run("group.assign_group", group=new_group, products=[new_annotation])
|
||||
|
||||
old_reference = drawing_tool.get_drawing_document(new_drawing)
|
||||
ifc.run("document.unassign_document", product=new_drawing, document=old_reference)
|
||||
ifc.run("document.unassign_document", products=[new_drawing], document=old_reference)
|
||||
|
||||
information = ifc.run("document.add_information")
|
||||
uri = drawing_tool.get_default_drawing_path(drawing_name)
|
||||
|
||||
@@ -139,5 +139,5 @@ class TestAssignDocument:
|
||||
|
||||
class TestUnassignDocument:
|
||||
def test_run(self, ifc):
|
||||
ifc.run("document.unassign_document", product="product", document="document").should_be_called()
|
||||
ifc.run("document.unassign_document", products=["product"], document="document").should_be_called()
|
||||
subject.unassign_document(ifc, product="product", document="document")
|
||||
|
||||
@@ -391,7 +391,7 @@ class TestDuplicateDrawing:
|
||||
ifc.run("group.assign_group", group="new_group", products=["new_annotation"]).should_be_called()
|
||||
|
||||
drawing.get_drawing_document("new_drawing").should_be_called().will_return("old_reference")
|
||||
ifc.run("document.unassign_document", product="new_drawing", document="old_reference").should_be_called()
|
||||
ifc.run("document.unassign_document", products=["new_drawing"], document="old_reference").should_be_called()
|
||||
|
||||
ifc.run("document.add_information").should_be_called().will_return("information")
|
||||
ifc.run("document.add_reference", information="information").should_be_called().will_return("reference")
|
||||
|
||||
Reference in New Issue
Block a user