You can now show and hide distribution ports of an element.

This commit is contained in:
Dion Moult
2022-01-29 08:52:37 +11:00
parent 92a1739d93
commit 9279aeccf6
17 changed files with 194 additions and 18 deletions
+1
View File
@@ -33,6 +33,7 @@
# We always call the module we're testing the "test subject". This makes our
# tests simple to read: just look for where the "subject" is called!
import blenderbim.core.demo as subject
# These are like mocks, stubs, or spy objects. They don't do anything, but they
# let us check our test expectations.
from test.core.bootstrap import ifc, demo
+15
View File
@@ -88,3 +88,18 @@ class TestSelectSystemProducts:
def test_run(self, system):
system.select_system_products("system").should_be_called()
subject.select_system_products(system, system="system")
class TestShowPorts:
def test_run(self, system):
system.get_ports("element").should_be_called().will_return(["port"])
system.load_ports(["port"]).should_be_called()
system.select_elements(["port"]).should_be_called()
subject.show_ports(system, element="element")
class TestHidePorts:
def test_run(self, system):
system.get_ports("element").should_be_called().will_return(["port"])
system.delete_element_objects(["port"]).should_be_called()
subject.hide_ports(system, element="element")