Example #1
0
 def testDispatchDisplayer(self):
     """WindowWidget.dispatchDisplayers transmits self to child."""
     widget = SizeableWidget()
     my_window = windowwidget.WindowWidget()
     my_window.addChild(widget, 'end')
     displayer = MockDisplayer()
     my_window.dispatchDisplayers(displayer)
     self.assertTrue(my_window.getDisplayer() is displayer)
     self.assertTrue(widget.getDisplayer() is my_window)
Example #2
0
    def testDispatchDisplayer(self):
        """ContainerWidget.dispatchDisplayers transmits displayers to children.

        """
        widget1 = SizeableWidget()
        widget2 = SizeableWidget()
        my_container = containerwidget.ContainerWidget()
        my_container.addChild(widget1, 'end')
        my_container.addChild(widget2, 'end')
        displayer = MockDisplayer()
        my_container.dispatchDisplayers(displayer)
        self.assertTrue(my_container.getDisplayer() is displayer)
        self.assertTrue(widget1.getDisplayer() is displayer)
        self.assertTrue(widget2.getDisplayer() is displayer)