mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-10 22:16:41 +00:00
Test edit object placement. See #1711
This commit is contained in:
@@ -77,6 +77,13 @@ def owner():
|
||||
prophet.verify()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def surveyor():
|
||||
prophet = Prophecy(blenderbim.core.tool.Surveyor)
|
||||
yield prophet
|
||||
prophet.verify()
|
||||
|
||||
|
||||
class Prophecy:
|
||||
def __init__(self, cls):
|
||||
self.subject = cls
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
import blenderbim.core.geometry as subject
|
||||
from test.core.bootstrap import ifc, surveyor
|
||||
|
||||
class TestEditObjectPlacement:
|
||||
def test_run(self, ifc, surveyor):
|
||||
ifc.get_entity("obj").should_be_called().will_return("element")
|
||||
surveyor.get_absolute_matrix("obj").should_be_called().will_return("matrix")
|
||||
ifc.run("geometry.edit_object_placement", product="element", matrix="matrix").should_be_called()
|
||||
subject.edit_object_placement(ifc, surveyor, obj="obj")
|
||||
Reference in New Issue
Block a user